[odb-users] persist non-member containers

Boris Kolpackov boris at codesynthesis.com
Fri Sep 25 10:04:19 EDT 2015


Hi,

MM <finjulhich at gmail.com> writes:

> What sort of work around is possible if I cannot change my global
> container?

The same workaround that you've been using for a while now: virtual
members. With virtual members, the actual data can be anywhere as
long as you can provide suitable accessors/modifiers. So if you
create an object with a virtual data member that always returns
your global container, and you only persist a single instance of
this object, then that should do the trick.

Boris



More information about the odb-users mailing list