matrei opened a new pull request, #16540: URL: https://github.com/apache/grails-core/pull/16540
Hibernate 5 counterpart of #16531. ## Problem In a bidirectional many-to-many where only the owning side configures `joinTable: [name: ...]`, the inverse side derived a default table name, so it read a table nobody wrote and its collection was always empty. ## Fix When the inverse side has no join table name of its own, it uses the name, schema and catalog of the owning side's join table. An inverse side that names its own table is unchanged. Only the table name needs inheriting on Hibernate 5: it ignores `column` on a many-to-many and takes each side's element column from the other side's `key`, so the columns already match. ## Compatibility The inverse collection, and queries through it, now return the rows the owner wrote. The previously mapped default-named table is no longer created (with `update` it stays in place, unused). ## Tests New `ManyToManyInverseJoinTableSpec`. Two features fail without the fix. `grails-data-hibernate5-core`: 623 tests, 0 failures. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
