You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 22, 2019. It is now read-only.
I would expect that the _id of the object, once created in the db, would be the same as what I set it to. At the
moment it is lost, and a new one auto generated.
Likewise, if I do something like:
doc = {
... "_id": "the id I generate",
... "key": ["the id I generate", 0]
... }
db['thing'] = doc
the _id in the dictionary is over ridden by the db['thing'](though I can understand that).
I guess this would mean changing the Database.create() method, and given that's a short but sweet method
maybe this isn't practical. Doing the db['id I want'] is fine, but I think it would be neater if this was wrapped up in
the Document object (maybe it is and I'm missing something obvious...).
I ask because the application I'm evaluating using Couchdb (and it's python interface) for will have a lot of
GUID's already in place, and I don't really want/need a new one.
Cheers
Simon
From simonmetson@googlemail.com on December 03, 2008 19:26:17
Hello,
Sorry if I'm missing something obvious, I only started playing with CouchDB yesterday, and it's been a long
week... ;)
If I create a document object:
I would expect that the _id of the object, once created in the db, would be the same as what I set it to. At the
moment it is lost, and a new one auto generated.
Likewise, if I do something like:
the _id in the dictionary is over ridden by the db['thing'](though I can understand that).
I guess this would mean changing the Database.create() method, and given that's a short but sweet method
maybe this isn't practical. Doing the db['id I want'] is fine, but I think it would be neater if this was wrapped up in
the Document object (maybe it is and I'm missing something obvious...).
I ask because the application I'm evaluating using Couchdb (and it's python interface) for will have a lot of
GUID's already in place, and I don't really want/need a new one.
Cheers
Simon
Original issue: http://code.google.com/p/couchdb-python/issues/detail?id=39
The text was updated successfully, but these errors were encountered: