doctrine / couchdb-odm

A Document Mapper based on CouchDB
http://www.doctrine-project.org
MIT License
150 stars 53 forks source link

Xml version mapping #111

Closed kore closed 9 years ago

kore commented 9 years ago

To create a properly working field with the documents revision, when using XML mapping files, one has to use:

<field name="version" version="true" type="string" json-name="_rev" />

Especially the requirement of specifying the json-name manually imho requires too much internal knowledge. If not specifying the json-name attribute the revision will be set on write, but not on any read later, which is hard to debug as well.

With this PR one can specify version fields like:

<version name="version" />