couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COUCHDB-2341) Cannot create "id" field
Date Tue, 30 Sep 2014 16:35:34 GMT

    [ https://issues.apache.org/jira/browse/COUCHDB-2341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14153363#comment-14153363
] 

ASF GitHub Bot commented on COUCHDB-2341:
-----------------------------------------

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 <rok@kowalski.gd>
Date:   2014-09-30T15:28:47Z

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

commit ce0496fc7c66fb83f9005487cf62af03e30403ac
Author: Robert Kowalski <rok@kowalski.gd>
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"

----


> Cannot create "id" field
> ------------------------
>
>                 Key: COUCHDB-2341
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-2341
>             Project: CouchDB
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: Fauxton
>            Reporter: Garren Smith
>            Assignee: Robert Kowalski
>
> Fauxton stops a user from creating a "id" field. This was an attempt to be helpful but
its not effective and will confuse the user. We need to remove that check and allow a user
to create an id field.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message