From a4f25daf17392c9c4b90de60b9d777290706f667 Mon Sep 17 00:00:00 2001
From: Boris Kolpackov
You can override the default behavior and instruct the ODB
+ compiler to generate non-deferrable foreign keys by specifying
+ the --fkeys-deferrable-mode not_deferrable
ODB
+ compiler option. Note, however, that in this case the order in
+ which you persist, update, and erase objects within a transaction
+ becomes important.
Finally, ODB relies on standard SQL behavior which requires +
Finally, ODB assumes the standard SQL behavior which requires
that foreign key constraints checking is deferred until the
transaction is committed. Default SQLite behavior is to check such
constraints immediately. As a result, when used with ODB, a custom
- database schema that defines foreign key constraints must declare
- such constraints as DEFERRABLE INITIALLY DEFERRED
, as
- shown in the following example. Schemas generated by the ODB compiler
- meet this requirement automatically.
DEFERRABLE INITIALLY DEFERRED
,
+ as shown in the following example. By default, schemas generated by
+ the ODB compiler meet this requirement automatically.
CREATE TABLE Employee ( @@ -16925,6 +16932,12 @@ CREATE TABLE Employee ( DEFERRABLE INITIALLY DEFERRED);+
You can override the default behavior and instruct the ODB
+ compiler to generate non-deferrable foreign keys by specifying
+ the --fkeys-deferrable-mode not_deferrable
ODB
+ compiler option. Note, however, that in this case the order in
+ which you persist, update, and erase objects within a transaction
+ becomes important.
ODB relies on standard SQL behavior which requires that +
ODB assumes the standard SQL behavior which requires that
foreign key constraints checking is deferred until the
transaction is committed. Default PostgreSQL behavior is
to check such constraints immediately. As a result, when
used with ODB, a custom database schema that defines foreign
- key constraints must declare such constraints as
+ key constraints may need to declare such constraints as
INITIALLY DEFERRED
, as shown in the following example.
- Schemas generated by the ODB compiler meet this requirement
+ By default, schemas generated by the ODB compiler meet this requirement
automatically.
@@ -17662,6 +17675,13 @@ CREATE TABLE Employee ( employer BIGINT REFERENCES Employer(id) INITIALLY DEFERRED);+
You can override the default behavior and instruct the ODB
+ compiler to generate non-deferrable foreign keys by specifying
+ the --fkeys-deferrable-mode not_deferrable
ODB
+ compiler option. Note, however, that in this case the order in
+ which you persist, update, and erase objects within a transaction
+ becomes important.
Due to the granularity of the PostgreSQL error codes, it is impossible @@ -18533,14 +18553,14 @@ class long_class_name
ODB relies on standard SQL behavior which requires that +
ODB assumes the standard SQL behavior which requires that
foreign key constraints checking is deferred until the
transaction is committed. Default Oracle behavior is
to check such constraints immediately. As a result, when
used with ODB, a custom database schema that defines foreign
- key constraints must declare such constraints as
+ key constraints may need to declare such constraints as
INITIALLY DEFERRED
, as shown in the following example.
- Schemas generated by the ODB compiler meet this requirement
+ By default, schemas generated by the ODB compiler meet this requirement
automatically.
@@ -18550,6 +18570,13 @@ CREATE TABLE Employee ( DEFERRABLE INITIALLY DEFERRED);+
You can override the default behavior and instruct the ODB
+ compiler to generate non-deferrable foreign keys by specifying
+ the --fkeys-deferrable-mode not_deferrable
ODB
+ compiler option. Note, however, that in this case the order in
+ which you persist, update, and erase objects within a transaction
+ becomes important.
Due to the granularity of the Oracle error codes, it is impossible @@ -19667,12 +19694,19 @@ namespace odb
ODB relies on standard SQL behavior which requires that foreign +
ODB assumes the standard SQL behavior which requires that foreign key constraints checking is deferred until the transaction is committed. The only behavior supported by SQL Server is to check - such constraints immediately. As a result, schemas generated by - the ODB compiler for SQL Server have foreign key definitions - commented out. They are retained only for documentation.
+ such constraints immediately. As a result, by default, schemas + generated by the ODB compiler for SQL Server have foreign key + definitions commented out. They are retained only for documentation. + +You can override the default behavior and instruct the ODB
+ compiler to generate non-deferrable foreign keys by specifying
+ the --fkeys-deferrable-mode not_deferrable
ODB
+ compiler option. Note, however, that in this case the order in
+ which you persist, update, and erase objects within a transaction
+ becomes important.