[odb-users] odb persistence in a library
Boris Kolpackov
boris at codesynthesis.com
Tue Sep 29 10:38:59 EDT 2015
Hi Christian,
Christian Sell <christian at gsvitec.com> writes:
> My question is whether this is considered a supported use case, or if
> there are issues we may be running into. Specifically, I am uncertain
> about the implications for schema creation and schema migration (can
> 2 schemas that reside in the same database be migrated independently)
Yes, if you give them different names (--schema-name), they will end
up completely independently versioned. If you take closer look, you
will see that the schema creation/migration API has the optional
scheme name argument throughout. The only restriction is that if you
want to use different versions for different schemas, then the
corresponding object models should be independent (i.e., you won't
be able to #include headers that have '#pragma db model version' for
one object model into another). In fact, Section 13.1 has this to say
on the subject:
"It is also possible to have multiple object models within the same
application that have different versions. Such models must be independent,
that is, no headers from one model shall include a header from another.
You will also need to assign different schema names to each model with
the --schema-name ODB compiler option."
Boris
More information about the odb-users
mailing list