You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by robertkowalski <gi...@git.apache.org> on 2014/09/30 18:34:37 UTC
[GitHub] couchdb-fauxton pull request: COUCHDB-2341 - do not remove id fiel...
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 <ro...@kowalski.gd>
Date: 2014-09-30T15:28:47Z
Editor: do not remove id field for docs
COUCHDB-2341
commit ce0496fc7c66fb83f9005487cf62af03e30403ac
Author: Robert Kowalski <ro...@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"
----
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] couchdb-fauxton pull request: COUCHDB-2341 - do not remove id fiel...
Posted by robertkowalski <gi...@git.apache.org>.
Github user robertkowalski closed the pull request at:
https://github.com/apache/couchdb-fauxton/pull/73
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] couchdb-fauxton pull request: COUCHDB-2341 - do not remove id fiel...
Posted by robertkowalski <gi...@git.apache.org>.
Github user robertkowalski commented on the pull request:
https://github.com/apache/couchdb-fauxton/pull/73#issuecomment-57345735
Awesome! Thank you!
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] couchdb-fauxton pull request: COUCHDB-2341 - do not remove id fiel...
Posted by garrensmith <gi...@git.apache.org>.
Github user garrensmith commented on the pull request:
https://github.com/apache/couchdb-fauxton/pull/73#issuecomment-57343976
@robertkowalski thats a bit weird. With backbone we can define the [`idAttribute`](http://backbonejs.org/#Model-idAttribute)
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] couchdb-fauxton pull request: COUCHDB-2341 - do not remove id fiel...
Posted by garrensmith <gi...@git.apache.org>.
Github user garrensmith commented on the pull request:
https://github.com/apache/couchdb-fauxton/pull/73#issuecomment-57345634
This looks good. I've merged to master.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---