You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Johnny Weng Luu (JIRA)" <ji...@apache.org> on 2011/07/14 11:01:01 UTC

[jira] [Commented] (COUCHDB-1222) Naming convention: _id/_rev and id/rev

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

Johnny Weng Luu commented on COUCHDB-1222:
------------------------------------------

The problem is when I create a new document CouchDB will return "id" and "rev". So my model must have "id" and "rev" attributes. No problem!

But then when I load a document into a model I will get "_id" and "_rev", but that won't work since my model has "id" and "rev" attributes.

So problematic. Why don't stick to either one of them. Would help out the frontend/backend framework.

> Naming convention: _id/_rev and id/rev
> --------------------------------------
>
>                 Key: COUCHDB-1222
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1222
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Johnny Weng Luu
>            Priority: Minor
>
> I'm using a MVC framework to communicate with CouchDB.
> Sometimes CouchDB returns _id/_rev and other times id/rev.
> Could either one of them be used instead, cause the model layer usually have pre set fields that can't be changed.
> And this would also not confuse developers when they are parsing the result.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira