Closed GoogleCodeExporter closed 8 years ago
There's more. After using create, my dict "doc" was not changed like in the
documentation (it did not contain _id nor _rev keys).
Using Database.save however returned a tuple with _id and _rev, and upon
inspecting the variable "doc" it contained the expected keys.
From my ipython console:
In [7]: db.create(doc)
/usr/local/bin/ipython:1: DeprecationWarning: Database.create is deprecated,
please use Database.save instead [2010-04-13]
#!/usr/bin/python
Out[7]: '00e78e9066d4541a81830e05cbe66e96'
In [8]: couchdb.__version__
Out[8]: '0.7'
In [9]: doc
Out[9]: {'loved': 'Olusia', 'lover': 'Rodolfo'}
In [10]: db.save(doc)
Out[10]: ('c92dc3d1b2570d1d915d587f47196c5c',
'1-fd43ca41a0e5d0104ab5facf2de2190a')
In [11]: doc
Out[11]:
{'_id': 'c92dc3d1b2570d1d915d587f47196c5c',
'_rev': '1-fd43ca41a0e5d0104ab5facf2de2190a',
'loved': 'Olusia',
'lover': 'Rodolfo'}
Original comment by rhcarva...@gmail.com
on 23 Jun 2010 at 2:06
Thanks for reporting this. I've just updated the doc to call Database.save and
updated the expected output. It should now be correct and consistent.
Original comment by matt.goo...@gmail.com
on 23 Jun 2010 at 2:25
Original issue reported on code.google.com by
rhcarva...@gmail.com
on 23 Jun 2010 at 2:01