couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Cottlehuber (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (COUCHDB-1609) Update function adds document with undefined ID
Date Fri, 23 Nov 2012 09:52:58 GMT

     [ https://issues.apache.org/jira/browse/COUCHDB-1609?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Dave Cottlehuber resolved COUCHDB-1609.
---------------------------------------

       Resolution: Duplicate
    Fix Version/s: 1.3
         Assignee: Dave Cottlehuber

Duplicate of COUCHDB-1483, this is resolved in master & 1.3.x branch #72ea7e3 - (6 months
ago) COUCHDB-1483 - Update handlers must produce valid doc ids.
                
> Update function adds document with undefined ID
> -----------------------------------------------
>
>                 Key: COUCHDB-1609
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1609
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core, JavaScript View Server
>    Affects Versions: 1.2
>         Environment: Mac OS X 10.8.2
> Python 2.7.2
>            Reporter: Anton Ananich
>            Assignee: Dave Cottlehuber
>             Fix For: 1.3
>
>
> I'm using update function _design/app/_update/test, here is the body of this function:
>   function(doc, req) {
>     return [req.form, '<p>Hello World</p>'];
>   }
> Using the HTML5 form below I submit a new object to this update function:
>   <form id="form" method="POST" action="_update/test">
>   <input type="hidden" name="type" value="payment">
>   <input type="hidden" name="version" value="4">
>   Date: <input type="date" name="date"><br/>
>   Note: <input type="text" name="note"><br/>
>   <input type="submit" value="save"><br/>
>   </form>
> As a result I expect to get either error (id is not specified) or new document with generated
ID (same as in POST request http://wiki.apache.org/couchdb/HTTP_Document_API#POST)
> In fact new document is created with NULL ID. I can see it in Futon, but can not modify.
The only way to get rid of this document is to drop whole the database.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message