[odb-users] Const members

Aarón Bueno Villares abv150ci at gmail.com
Sat Jan 9 16:15:41 EST 2016


I'm a little confused about const-members, because, though they cannot be
updated (which has sense, because there are presumed to don't be updated),
how are these members loaded? The documentation says nothing about the
semantics of const members for other database operations like persist, load
or find.

The most obvious thing is they are not loaded at all because you know, how
could ODB assigns values to it? But I don't know if ODB performs some kind
of const_cast to their members through reference accessors or whatever....

In other words, what are the semantics and what methods are required for an
object class, for:

   - const members
   - non-const but read-only members

?

Best regards,
Peregring-lk


More information about the odb-users mailing list