Hi Adam!
Mostly because this is system internal field, that not supposed to be
touched by clients. Accidental his changing may create unexpectable
conflict situations.
To create mapping.Document instance based on view result you have two ways:
1. Use ViewField to gain result data and Document class as result row wrapper.
2. Wrap view result manually by Document class on instance
initialization. Document revision would be automatically set by `_rev`
key parameter.
--
,,,^..^,,,
On Tue, Jul 17, 2012 at 5:51 PM, adam.cajf <
adam...@gmail.com> wrote:
> I'd like to know why rev property of the couchdb.mapping.Document class is
> read-only attribute. Even id attribute can be set, and I need in my project
> to create a new Document with rev, which I obtain from CouchDB view. I know
> that rev is generated in CouchDB, but that's a pity that creators didn't
> predict such an exception. Moreover, in my humble opinion there should be a
> get method for the Document class that could obtain many ids as a paramter.
>
> --
> You received this message because you are subscribed to the Google Groups
> "CouchDB-Python" group.
> To view this discussion on the web visit
>
https://groups.google.com/d/msg/couchdb-python/-/t0XgDS2BQBkJ.
> To post to this group, send email to
couchdb...@googlegroups.com.
> To unsubscribe from this group, send email to
>
couchdb-pytho...@googlegroups.com.
> For more options, visit this group at
>
http://groups.google.com/group/couchdb-python?hl=en.