[odb-users] multi-file schema?
Boris Kolpackov
boris at codesynthesis.com
Mon Sep 21 12:04:18 EDT 2015
Hi Christian,
Christian Sell <christian at gsvitec.com> writes:
> to be more specific with regard to your question: the schema file is
> generated (if I use separate), and it contains CREATE TABLE statements
> (e.g. for the schema_version table), but none for the library class
Normally, it should be you who provides the test that reproduces the
problem, so this is the last time:
$ cat test.hxx
struct object
{
int id;
int value;
};
$ cat test-mapping.hxx
#include <test.hxx>
#pragma db object(object) definition
#pragma db member(object::id) id auto
$ odb -d sqlite -s --schema-format separate --std c++11 -I. --input-name test test-mapping.hxx
$ cat test-schema.cxx
[...]
db.execute ("CREATE TABLE \"object\" (\n"
" \"id\" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,\n"
" \"value\" INTEGER NOT NULL)");
[...]
Boris
More information about the odb-users
mailing list