On Dec 28, 2008, at 9:50 AM, Geir Magnusson Jr. wrote:


On Dec 28, 2008, at 9:36 AM, Damien Katz wrote:


On Dec 28, 2008, at 8:58 AM, Geir Magnusson Jr. wrote:


The following two documents are legal JSON documents, but CouchDB can't store them (if I grok CouchDB right) :

{
"_id" : "geir's document",
"foo" : "bar"
}

{
"_id" : "geir's document",
"foo" : "woogie"
}

Sure you can:

{_id:"the actual id",
body:{
"_id" : "geir's document",
"foo" : "bar"
}
}


If you need to store underscore fields, store move the whole document down from the top level into another field.

I understand that, but that's really my point - I need to change my document if I want to store it in CouchDB. People don't seem to care though :)

You don't need to change it, but you might need to wrapper it. This is like complaining that you can't mail someone a postcard that contains in the message the address of someone other than the recipient. If you have that problem, then put it in an envelope.

-Damien

Reply via email to