Skip to content

Hibernate 7: round-trip #10811's own shared join table, and say it is the default - #16749

Merged
borinquenkid merged 1 commit into
8.0.xfrom
fix/h7-hasmany-followups-8.0.x
Oct 25, 2026
Merged

borinquenkid merged 1 commit into
8.0.xfrom
fix/h7-hasmany-followups-8.0.x

Conversation

@borinquenkid

Copy link
Copy Markdown
Member

Follow-up to #16686, from @jdaugherty's review at d3d2279.

Test only and docs; no main code changes. MultipleUnidirectionalHasManySpec and CollectionKeyColumnUpdaterSpec pass on H2 (12 tests).

https://claude.ai/code/session_01MDHn7fC3hsGJ27vFHD2o1p

…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
borinquenkid requested review from jdaugherty and a balanced review from Copilot and removed request for Copilot October 24, 2026 13:30
@borinquenkid
borinquenkid changed the base branch from fix/h7-multiple-hasmany-8.0.x to 8.0.x October 24, 2026 13:52

@jamesfredley jamesfredley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@borinquenkid
borinquenkid merged commit 362eb57 into 8.0.x Oct 25, 2026
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants