diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-11-08 17:29:55 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-11-08 17:29:55 +0200 |
commit | cd04c123045b34d0dc8eda5634675ad0eb0c0f53 (patch) | |
tree | 5696b1128ec9a437080d11f15c9806e5c14d70ac | |
parent | 10e1c1963096586b484988958539756385ce2c35 (diff) |
Add support for const version members
-rw-r--r-- | odb/relational/processor.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/odb/relational/processor.cxx b/odb/relational/processor.cxx index d0587ca..41093de 100644 --- a/odb/relational/processor.cxx +++ b/odb/relational/processor.cxx @@ -134,15 +134,16 @@ namespace relational wt = &utype (*qwt, whint); } - // If the type is const and the member is not id or inverse, then - // mark it as readonly. In case of a wrapper, both the wrapper type - // and the wrapped type must be const. To see why, consider these - // possibilities: + // If the type is const and the member is not id, version, or + // inverse, then mark it as readonly. In case of a wrapper, + // both the wrapper type and the wrapped type must be const. + // To see why, consider these possibilities: // // auto_ptr<const T> - can modify by setting a new pointer // const auto_ptr<T> - can modify by changing the pointed-to value // - if (const_type (m.type ()) && !(m.count ("id") || m.count ("inverse"))) + if (const_type (m.type ()) && + !(m.count ("id") || m.count ("version") || m.count ("inverse"))) { if (qwt == 0 || const_type (*qwt)) m.set ("readonly", true); |