On Dec 28, 2008, at 4:42 PM, Flinn Mueller wrote:
On Dec 28, 2008, at 11:22 AM, Geir Magnusson Jr. wrote:
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.
I respectfully disagree - I don't think that's an appropriate
analogy at all.
I think the analogy is perfect actually. Wasn't it also established
that you could set _id and _rev arbitrarily anyway? The above only
matters if you put the postcard in the mail. If I address the
postcard then hand deliver it then it really doesn't matter what the
address is anyway does it?
You can't set them arbitrarily - you can't have a two documents with
the same ID, right?
We figured out the disconnect on IRC - all documents that CouchDB
stores are JSON, but not all JSON documents can be stored by CouchDB.
I mistakenly jumped to the conclusion that CouchDB could store any
JSON doc, but to be fair, that's never stated or claimed. I inferred
it from the bullet about being "Ad-hoc and schema-free", but it turns
out that doesn't mean what I thought it meant.
I'm coming at the problem from a different direction - rather than
looking for a persistence engine that stores data as JSON, I'm looking
for a persistence engine that stores JSON documents. It's easy to
build on top of CouchDB, so I'm going to explore that.
geir