
dm-couchdb-adapter relies on abnormal naming scheme
Reported by Bob Aman | May 11th, 2008 @ 03:05 PM
Right now, the dm-couchdb-adapter expects a User
resource to have a corresponding users
database in CouchDB. This is very strange. This is what a typical CouchDB database looks like (taken from the Ajatus CRM):
4c480f9453cc31c017241ab61d0e334c
66a500d4ab151613fbb9a808ace9e21a
92a28dd10796ddbfc4de273f11e815a4
E16902809F2021F5397D64D0B0322310
_design/contact
_design/event
_design/expense
_design/hour_report
_design/note
_design/tag
In this example, there is 1 contact (E169028...) in the DB with 3 tags (4c480f9..., 66a500d4..., 92a28dd...).
Essentially, document type is determined by the internal structure of the document (typically by checking the _type property), not by which database it's in. CouchDB's not exactly a table/row based database. :-) The dm-couchdb-adapter really needs to be completely rewritten to be more flexible. I'll happily volunteer to take responsibility for this, assuming there's agreement that the change needs to happen.
Comments and changes to this ticket
-
Sam Smoot May 14th, 2008 @ 10:21 PM
It sounds sane to me, but I'd wait for Bernerd's input since it's his baby.
-
Bob Aman May 14th, 2008 @ 10:28 PM
Well, rather than a rewrite, I opted to fix the main problem within the current codebase. The code still needs a significant reworking, but the issue of creating a new database for each type has been resolved.
-
Sam Smoot May 21st, 2008 @ 01:11 AM
- Milestone cleared.
So you're happy with this? Not happy? I'm going to set the milestone to 1.0. Otherwise I'm guessing we're just waiting on Bernerd's input...
-
-
Matt May 28th, 2008 @ 03:15 PM
might want to look at how couch_object does it http://couchobject.rubyforge.org/
-
Dan Kubb (dkubb) December 1st, 2008 @ 01:41 AM
- Tag set to dm-more
- Milestone cleared.
- State changed from new to open
- Assigned user changed from Bernerd Schaefer to Dan Kubb (dkubb)
-
Dan Kubb (dkubb) December 4th, 2008 @ 03:27 AM
- State changed from open to unconfirmed
- Assigned user changed from Dan Kubb (dkubb) to geemus (Wesley Beary)
Wesley, would you mind looking into this?
If you decide to take it on, would you also mind changing the ticket status to "accepted" so we know you're working on it.
-
geemus (Wesley Beary) December 4th, 2008 @ 12:17 PM
- State changed from unconfirmed to not-applicable
Although there may still be room for some of the other improvements that were left unspecified, the adapter has already been changed to store everything in one database, separated by a type attribute as suggested.
If there are other changes I'd be happy to address them within the context of other tickets, but since this one was created there have already been some significant rewrites which (I hope) should make things much cleaner and easier to work with.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »