[odb-users] unknown database schema ''

Boris Kolpackov boris at codesynthesis.com
Fri Jan 30 05:12:16 EST 2015


Hi Diego,

Diego Fernando <lordvampyre at gmail.com> writes:

>         schema_catalog::create_schema(*db);
>
> [...]
>
> ODB_FLAGS = --database pgsql --profile qt --generate-schema
> --generate-query --generate-session --std c++11

For the Postgres database (and all others except SQLite), the schema
by default is generated in a standalone .sql file. If you want it
embedded into the generated C++ code (so that you can use the
create_schema() call above), you need to add '--schema-format embedded'.
See the ODB compiler command line manual (man page) for details.

Boris



More information about the odb-users mailing list