Calling SchemaUtils.createMissingTablesAndColumns() on a table with a composite foreign key incorrectly produces 2 ALTER statements (to drop and add the same constraint) when testing on some H2 compatibility modes (Oracle and SQL Server).
This occurs because these H2 modes delegate to the respective dialects which have NO_ACTION stored as their default.
But a foreign key sent to the H2 database with NO_ACTION is returned by the driver metadata as the equivalent RESTRICT, leading to a false constraint equality check.
Calling
SchemaUtils.createMissingTablesAndColumns()
on a table with a composite foreign key incorrectly produces 2ALTER
statements (to drop and add the same constraint) when testing on some H2 compatibility modes (Oracle and SQL Server).This occurs because these H2 modes delegate to the respective dialects which have
NO_ACTION
stored as their default. But a foreign key sent to the H2 database withNO_ACTION
is returned by the driver metadata as the equivalentRESTRICT
, leading to a false constraint equality check.