my $doc = $db->newDoc('12345', undef, {'foo'=>'bar'})->create; - this creates a document and stores it into the DB in one line. This can only be done once, without having the DB generate an error and crap out - Expecting otherwise is only something you should do if you're working with MySQL.
To create a new, blank document object that you can work with, try my $doc = $db->newDoc();, or you could even go so far as my $doc = $db->newDoc->retrieve('12345');
UPDATE: To my mind this is counter-intuitive, as retrieving a document from the DB should be something you do to the DB, not to a document object
In reply to Re: Retrieving content from couchdb using CouchDB::Client
by SimonPratt
in thread Retrieving content from couchdb using CouchDB::Client
by shivam99aa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |