Repository navigation
Hibernate 7: round-trip #10811's own shared join table, and say it is the default - #16749
Merged
Merged
Conversation
…it is the default The shared-table fixture of MultipleUnidirectionalHasManySpec mapped both associations onto one key column with an element column each, the mirror of #10811. It now has no mapping, so the two associations to the same class share the default join table with a key column each, as in #10811, and its labels say what runs: each association reads its row by its own key column, and the flush writes nothing to the shared table. Making the key always updatable fails that assertion with a third row. The upgrade note and the one-to-many chapter now say that two associations to the same class share one join table by default, with the table and columns GORM creates, so a reader with that mapping knows the #10811 note is about them and that a joinTable per association avoids it. Claude-Session: https://claude.ai/code/session_01MDHn7fC3hsGJ27vFHD2o1p
borinquenkid
requested review from
jdaugherty
and
a balanced review from Copilot
and removed request for
Copilot
October 24, 2026 13:30
borinquenkid
changed the base branch from
fix/h7-multiple-hasmany-8.0.x
to
8.0.x
October 24, 2026 13:52
jamesfredley
approved these changes
Oct 24, 2026
jamesfredley
left a comment
Contributor
There was a problem hiding this comment.
Approving. The fixture uses the default shared join table, and a third row would fail the assertion. The docs say that table is readable and that new elements stay unwritten, and that a joinTable per association avoids that. No production code change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #16686, from @jdaugherty's review at d3d2279.
MultipleUnidirectionalHasManySpec: the shared-table fixture now has no mapping, so its twohasManyto the same class share the default join table with a key column each, which is Grails 3.3.0 - multiple hasManys referencing the same domain -> columns not nullable #10811 as reported. Its labels now describe what runs: each association reads its row by its own key column, and the flush writes nothing to the shared table. Making the key always updatable fails the assertion with a third row.item_rolewithitem_roles_idanditem_deny_roles_id), and that ajoinTableper association avoids Grails 3.3.0 - multiple hasManys referencing the same domain -> columns not nullable #10811.Test only and docs; no main code changes.
MultipleUnidirectionalHasManySpecandCollectionKeyColumnUpdaterSpecpass on H2 (12 tests).https://claude.ai/code/session_01MDHn7fC3hsGJ27vFHD2o1p