[odb-users] FOREIGN KEY is commented (one-to-many)
Boris Kolpackov
boris at codesynthesis.com
Wed Jul 22 10:37:47 EDT 2015
Hi Mohammad,
Mohammad Pahlevan <pahlevan at gmail.com> writes:
> in SQL Script that Generated by odb compiler, FOREIGN KEY for one-to-many
> Relation is Commented.
Quoting the ODB compiler command line manual (man pages):
--fkeys-deferrable-mode m
Use constraint checking mode m in foreign keys generated for object
relationships. Valid values for this option are not_deferrable, immediate,
and deferred (default). MySQL and SQL Server do not support deferrable
foreign keys and for these databases such keys are generated commented
out. Other foreign keys generated by the ODB compiler (such as the ones
used to support containers and polymorphic hierarchies) are always
generated as not deferrable.
Note also that if you use either not_deferrable or immediate mode, then
the order in which you persist, update, and erase objects within a
transaction becomes important.
Boris
More information about the odb-users
mailing list