Steve, I've been running some tests that include your fix for
HHH-10045
.There still seems to be some problems. If you run the test:org.hibernate.test.cascade.MultiPathCascadeTest.testMultiPathGetAndModify using H2, it will invoke the new code, but the SQL that it generates is:
create table HB_G_H ( g_fk bigint, h_fk bigint not null, primary key (h_fk, g_fk) ) The problem being that g_fk should have been declared "not null".It seems that the correct changes to non-null are made in the PrimaryKey code but in StandardTableExported.getSqlCreateStrings(), the decision on whether to add "not null" to the create String is done using the Columns from Table and the g_fk Column there indicated that it is nullable. The Columns defined in PrimaryKey do have the correct settings.
I've tried to come up with a change to fix it while keeping the mods to PrimaryKey, but the solutions I'm coming up with seem too kludgy. Let me know what you think...
Dave
|