[odb-users] Encapsulating ODB
boris at codesynthesis.com
Tue Jul 27 09:38:47 EDT 2021
Adam Walters <awalters at spsy.com> writes:
> Although ODB encapsulates the database code, the classes used for
> persistence have to reference the ODB includes so that the pragmas
> and other references compile.
You can move the pragmas (and any ODB #include's that they require)
to a separate file or #ifdef them out using the ODB_COMPILER macro.
The introduction to Chapter 14, "ODB Pragma Language" has all the
Of course that also means you persistent classes won't be able to
use some of the ODB feature that depend on types (and thus headers)
provided by ODB, such as lazy pointers, change-tracking contains,
More information about the odb-users