[odb-users] Instantation of odb::result<my_type> e.g. odb::query<my_type> fails

Boris Kolpackov boris at codesynthesis.com
Mon Aug 24 09:54:22 EDT 2015


Markus Klemm <markus at markusklemm.net> writes:

> Is there a general rule, when to use the q and e flag?

I think the man page is pretty clear:

--generate-query|-q
    Generate query support code. Without this support you cannot use
    views and can only load objects via their ids.

--generate-session|-e
    Generate session support code. With this option session support
    will be enabled by default for all the persistent classes except
    those for which it was explicitly disabled using the 'db session
    pragma'.

In other words, you would need -q if you want to use ODB queries
(Chapter 4) and -e if you want to use ODB session (Chapter 11).

Boris



More information about the odb-users mailing list