The GitHub Actions job "CI" on 
grails-core.git/fix/h7-shared-join-table-lists-8.0.x has succeeded.
Run started by GitHub user borinquenkid (triggered by borinquenkid).

Head commit for run:
d1e0529d841e330a04a4a096312369c5db7e78f6 / Walter Duque de Estrada 
<[email protected]>
fix(hibernate7): write the rows of lists and maps that share a join table

Two unidirectional hasMany lists (or maps) to the same class that share a
join table could not be saved (apache/grails-core#16700). Hibernate keys
the join table of a list or a map with a primary key over its key and
index columns (IndexedCollection.createPrimaryKey), which the next
collection of a shared table replaces with its own and which makes those
columns not null; a row of one list leaves the other list's columns null,
so every insert but the last list's failed with "NULL not allowed for
column ROLES_IDX".

SharedJoinTableUniqueKeyBinder now gives each list or map of a shared
table nullable key and index columns, drops that primary key, and a
uniqueness of its own over its key and index columns, in the shape
SharedJoinTableUniqueness gives sets: a unique key per list, or on Oracle
and Db2 LUW one key over the columns of every list that shares a column
with it. A position or a map key is taken once, while an element may
repeat. SharedJoinTableUniqueness on those databases creates the key when
there is none to widen, as a list has no implicit unique key.

SharedJoinTableListHibernate7Spec: both shapes of shared table keep their
lists in order; removing from one list keeps the other; an element may
repeat and clearing one list keeps the other; two maps keep their
entries; and on H2, PostgreSQL, MySQL, MariaDB, Oracle and Db2 (CI) both
shapes are written and read, and a second row at a taken position is
rejected (without the uniqueness every database accepts it).
SharedJoinTableUniqueKeyBinderSpec: the DDL of two shared lists on H2,
Oracle, Db2 LUW, IBM i and SQL Server. Docs: the upgrade note, with the
migration an older Grails 8 schema needs, and the one-to-many chapter.

Claude-Session: https://claude.ai/code/session_01MDHn7fC3hsGJ27vFHD2o1p

Report URL: https://github.com/apache/grails-core/actions/runs/40132431052

With regards,
GitHub Actions via GitBox

Reply via email to