From cd04c123045b34d0dc8eda5634675ad0eb0c0f53 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 8 Nov 2011 17:29:55 +0200 Subject: Add support for const version members --- odb/relational/processor.cxx | 11 ++++++----- 1 file 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 - can modify by setting a new pointer // const auto_ptr - 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); -- cgit v1.1