jamesfredley commented on code in PR #16686:
URL: https://github.com/apache/grails-core/pull/16686#discussion_r4338912627


##########
grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/cfg/domainbinding/secondpass/CollectionKeyColumnUpdaterSpec.groovy:
##########
@@ -103,6 +132,47 @@ class CollectionKeyColumnUpdaterSpec extends 
HibernateGormDatastoreSpec {
         !key.isUpdateable()

Review Comment:
   This asserts `!key.isUpdateable()` on a key the test built itself and 
returned from a mocked `CollectionKeyBinder`. It never saves, flushes, or 
reloads, so it does not show that two unidirectional associations sharing a 
join table still behave as intended through GORM.
   
   `MultipleUnidirectionalHasManySpec` covers separate tables. Please add a 
public GORM round-trip for the shared-table branch as well: two unidirectional 
hasMany associations on one join table, save, clear the session, reload, and 
assert the rows that this non-updatable key is supposed to preserve. The 
package-private flag check can stay, but it is not the regression.



-- 
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]

Reply via email to