nlight-jdev / jcouchdb

Automatically exported from code.google.com/p/jcouchdb
Other
0 stars 0 forks source link

Problems with update of a document with attachments #49

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a BaseDocument with Attachment and store it with
createOrUpdateDocument()
2. Load a document with getDocument()
3. Change some property and try to store it again with createOrUpdateDocument()

The couchdb will return code 412.

I found, that jcouchdb sends a PUT with property "data" of _attachments set
to null. I just add a @JSONProperty(ignoreIfNull=true) to the getter
Attachment.getData() and update works OK.

What version of the product are you using? On what operating system?
couchdb 0.11
jcouchdb actual trunk

Original issue reported on code.google.com by vasek%za...@gtempaccount.com on 7 Jun 2010 at 8:23

GoogleCodeExporter commented 8 years ago
Hello,I have the some problem.The some code is right to a document which is not 
contain attachment while is wrong to contain attachment when i add some 
property to the exist document.

Can you tell me detailedly how to solve the problem?Thank You!!

Original comment by bupt.z...@gmail.com on 29 Aug 2010 at 5:58

GoogleCodeExporter commented 8 years ago
This problem is solved with the new version. 

Original comment by ff...@gmx.de on 11 Sep 2010 at 9:24