GitHub user robertkowalski opened a pull request:

    https://github.com/apache/couchdb-fauxton/pull/73

    COUCHDB-2341 - do not remove id field for docs

    After I finished the initial work I found a neat bug now that the custom 
`id` values are possible:
    
    If we have a document with an **id** attribute `foo` and **_id**: `customid`
    added from the user and we do a PUT request for an update,
    CouchDB will return: {"ok":true, **id: "customid"**, rev: "123"}
    
    The Model will think it has the id "mycustomid" instead of "foo"

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/robertkowalski/couchdb-fauxton 
COUCHDB-2341--id-field

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb-fauxton/pull/73.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #73
    
----
commit 7be7e1a4d02b436d4092e9a6c7d5f58dcb1e259e
Author: Robert Kowalski <[email protected]>
Date:   2014-09-30T15:28:47Z

    Editor: do not remove id field for docs
    
    COUCHDB-2341

commit ce0496fc7c66fb83f9005487cf62af03e30403ac
Author: Robert Kowalski <[email protected]>
Date:   2014-09-30T16:23:57Z

    Editor: don't replace custom id attribute with document-id
    
    If we have a document with an id attribute "foo" and _id: "customid"
    added from the user and we do a PUT request for an update,
    CouchDB will return: {"ok":true, id: "customid", rev: "123"}
    
    The Model will think it has the id "mycustomid" instead of "foo"

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to