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 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

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 that couchDB

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 pub...@thepete.net 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
On Tue, Dec 1, 2009 at 8:32 AM, Chris Anderson jch...@apache.org wrote: On Tue, Dec 1, 2009 at 8:30 AM, Pete Hodgson pub...@thepete.net 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

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

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 pub...@thepete.net wrote: Hi list, I'm a newbie with couchDB, so please forgive any transgressions. Also, I'm cross-posting this question to Stack Overflow,

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 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

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 pub...@thepete.net wrote: Roger, please accept my apologies.