[odb-users] PKs and FKs at the same time

Boris Kolpackov boris at codesynthesis.com
Mon Mar 23 08:03:46 EDT 2015


Hi Nicholas,

Nicholas Cremonesi <nicholas.cremonesi at gmail.com> writes:

>     void init (odb::callback_event e, odb::database& db)
>     {
>         if (e == odb::callback_event::post_load)
>             FK_TableA_TableB_ = db.load<Table_B> (pk_tblA_);
>     }

Move the callback definition to the source file and make sure
you include the *-odb header file for Table_B.

Boris



More information about the odb-users mailing list