borinquenkid commented on issue #16634: URL: https://github.com/apache/grails-core/issues/16634#issuecomment-6596632869
Probed on 8.0.x (Hibernate 7, classic binder) with the three entities from the description. The generated schema has one join table, `EMBED_MEMBER`, with columns `EMBED_MEMBERS_ID` and `MEMBER_ID`. The holder table has no column for the embedded entity, and the join table has no reference to the holder. So the component binding and the standalone binding resolve to the same table and key, and a holder's `embed.members` cannot be told apart from a standalone `Embed`'s. That matches the report, apart from the key: it is the embedded entity's own id column rather than the holder's. The cause is in `GormMappingConfigurationStrategy.getOrCreateEmbeddedEntity` in `grails-datastore-core`, which every GORM implementation shares, so a fix on 8.0.x would change them all. It stays on 9.0.0-M1 with native binding. -- 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]
