borinquenkid commented on PR #16617: URL: https://github.com/apache/grails-core/pull/16617#issuecomment-6113456934
Added tests for the other two collection kinds and for `CollectionBinderSpec`: - `CollectionBinderSpec`: `bindCollection` registers the second pass that matches the collection (set, list, map), and binding one property twice registers a pass and a collection for each binding. - `EmbeddedEntityCollectionKindsSpec` (integration, `HibernateGormDatastoreSpec`): an embedded entity whose `hasMany` is a set, a list and a map is saved and read back through a real session. With the four production files reverted all three fail with the same `Collection.getElement()` NPE; with the fix they pass. Full `:grails-data-hibernate7-core:test` on the branch: 422 suites, 3730 tests, 0 failures, 0 errors, 22 skipped. `codenarcTest` and `checkstyleTest` pass. Not covered here: an entity that is both embedded and used on its own. Its standalone `hasMany` join table has a foreign key to the holder's table, because the two bindings share one collection table. That limitation exists independently of this fix, since the session factory did not build at all before it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
