Re: representing many-to-many relations with concurrent inserts

2009-12-15 Thread Mark Hammond
On 15/12/2009 6:51 PM, Troy Kruthoff wrote: When I first read about this feature I had to take my sql pills to calm me down, but then I discovered you do not get the emitting doc as well (bummer). ... Better yet would be to allow an array: {'_id',['id1','id2']...} +1 - that is what would make

Re: representing many-to-many relations with concurrent inserts

2009-12-14 Thread Troy Kruthoff
When I first read about this feature I had to take my sql pills to calm me down, but then I discovered you do not get the emitting doc as well (bummer). For example, accounts and users as separate docs, a view listing users with include_docs would return the user (emitter) and the account (

Re: representing many-to-many relations with concurrent inserts

2009-12-12 Thread Alexander Uvarov
+1. This sounds like a killer-feature. On Dec 12, 2009, at 10:55 PM, Jan Lehnardt wrote: Hi, I don't think this has been documented yet. It'd be great if you could update the wiki :) Cheers Jan -- On 1 Dec 2009, at 11:51, christian schilling wrote: thats sounds like a feature i have been wa

Re: representing many-to-many relations with concurrent inserts

2009-12-12 Thread Jan Lehnardt
Hi, I don't think this has been documented yet. It'd be great if you could update the wiki :) Cheers Jan -- On 1 Dec 2009, at 11:51, christian schilling wrote: > thats sounds like a feature i have been waiting for. sadly i can't find any > documentation about this, am i looking in the wrong pla

Re: representing many-to-many relations with concurrent inserts

2009-12-01 Thread christian schilling
thats sounds like a feature i have been waiting for. sadly i can't find any documentation about this, am i looking in the wrong places (couchdb wiki) or does is not exist? 2009/12/1 Chris Anderson > On Tue, Dec 1, 2009 at 8:30 AM, Pete Hodgson wrote: > >> Have you looked at the include_docs=tru

Re: representing many-to-many relations with concurrent inserts

2009-12-01 Thread Pete Hodgson
On Tue, Dec 1, 2009 at 8:32 AM, Chris Anderson wrote: > On Tue, Dec 1, 2009 at 8:30 AM, Pete Hodgson wrote: > >> Have you looked at the include_docs=true view query parameter? With > >> CouchDB 0.11 you can emit {"_id":"foo"} to include docs that aren't > >> the one that did the emiting. > >> >

Re: representing many-to-many relations with concurrent inserts

2009-12-01 Thread Chris Anderson
On Tue, Dec 1, 2009 at 8:30 AM, Pete Hodgson wrote: >> Have you looked at the include_docs=true view query parameter? With >> CouchDB 0.11 you can emit {"_id":"foo"} to include docs that aren't >> the one that did the emiting. >> >> This technique is used in http://aimpl.org/ >> >> >> > Hi Chris,

Re: representing many-to-many relations with concurrent inserts

2009-12-01 Thread Pete Hodgson
> Have you looked at the include_docs=true view query parameter? With > CouchDB 0.11 you can emit {"_id":"foo"} to include docs that aren't > the one that did the emiting. > > This technique is used in http://aimpl.org/ > > > Hi Chris, Thanks, I have tried include_docs. As I recall, when I did tha

Re: representing many-to-many relations with concurrent inserts

2009-11-30 Thread Chris Anderson
On Mon, Nov 30, 2009 at 3:05 PM, Pete Hodgson wrote: > Roger, please accept my apologies. I'll be sure to not cross-post on this > list again. Nathan, thanks for the link. That's a very helpful post. > > So do I take it from that post that creating a mapping document like I > described below is th

Re: representing many-to-many relations with concurrent inserts

2009-11-30 Thread Mark Hammond
On 1/12/2009 8:21 AM, Pete Hodgson wrote: This works fine up to a point, but I have issues when multiple clients are both attempting to add a matching entry to a topic. Both attempt optimistic updates, and one fails. Depending on the rate of expected conflicts, one solution is to simply retry

Re: representing many-to-many relations with concurrent inserts

2009-11-30 Thread Nathan Stott
Pete, You need to write a view that returns more than just LogTopicToLogEntryMap. Have it return the topic and entries too and then you can use include_docs to get it all in one query. On Mon, Nov 30, 2009 at 5:05 PM, Pete Hodgson wrote: > Roger, please accept my apologies. I'll be sure to n

Re: representing many-to-many relations with concurrent inserts

2009-11-30 Thread Pete Hodgson
Roger, please accept my apologies. I'll be sure to not cross-post on this list again. Nathan, thanks for the link. That's a very helpful post. So do I take it from that post that creating a mapping document like I described below is the Right Way to deal with concurrent update concerns? Also, is t

Re: representing many-to-many relations with concurrent inserts

2009-11-30 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Pete Hodgson wrote: > Also, I'm > cross-posting this question to Stack Overflow, > hope that's not considered rude. Posting the same question in multiple places is indeed rude! Do you expect people responding to have to check every location? No one

Re: representing many-to-many relations with concurrent inserts

2009-11-30 Thread Nathan Stott
You may find this blog post helpful: http://www.cmlenz.net/archives/2007/10/couchdb-joins On Mon, Nov 30, 2009 at 3:21 PM, Pete Hodgson wrote: > Hi list, > > I'm a newbie with couchDB, so please forgive any transgressions. Also, I'm > cross-posting this question to Stack Overflow, > > http://sta

representing many-to-many relations with concurrent inserts

2009-11-30 Thread Pete Hodgson
Hi list, I'm a newbie with couchDB, so please forgive any transgressions. Also, I'm cross-posting this question to Stack Overflow, http://stackoverflow.com/questions/1822444/representing-a-many-to-many-relationship-in-couchdbI hope that's not considered rude. Let's say I'm writing a log analysis