You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@grails.apache.org by "mario-catalan-motork (via GitHub)" <gi...@apache.org> on 2025/05/05 14:53:27 UTC
[I] Associations between GORM entities and Hibernate entities do not work in Grails 2.5.5 [grails-core]
mario-catalan-motork opened a new issue, #14712:
URL: https://github.com/apache/grails-core/issues/14712
By GORM entities I mean Grails domain classes mapped with GORM / the Grails ORM DSL, whereas by Hibernate entities I mean Java POJOs or Groovy POGOs mapped with Hibernate. While investigating this issue, I mostly used Java POJOs mapped with Hibernate annotations as Hibernate entities.
Related:
1. https://web.archive.org/web/20140404171027/http://jira.grails.org/browse/GRAILS-4996 - "failure when trying to reference Hibernate xml mapped class from a GORM class"
2. https://web.archive.org/web/20210109143831/http://grails.1312388.n4.nabble.com/Grails-1-2-0-DuplicateMappingException-td1392915.html - "Grails 1.2.0 DuplicateMappingException"
3. https://web.archive.org/web/20110128084721/http://jira.codehaus.org/browse/GRAILS-5721 - "hbm.xml mapped domain classes cause spring failure when a many-to-one relationship exists from non-hbm.xml mapped domain class."
Importantly, in one of the comments on the first page linked above, @graemerocher said the following:
> This is because you have an association from your Hibernate mapped class to your GORM domain. Relationships between GORM and hibernate mapped entities don't really work and would take a significant re-write of the ORM binding to support both, which certainly won't make it into 1.2
Question: Was support for associations between GORM entities and Hibernate entities ever implemented before Grails 3?
For example, in Grails 2.5.5, the GrailsDomainBinder seems unable to map Grails domain classes which reference Hibernate-mapped Java POJOs in their associations:
1. First, because it seems to not recognize such associations, so the association definition and configuration using GORM / the Grails ORM DSL is ignored - only associations between Grails domain classes appear to be recognized.
2. Second, because it can not find the Hibernate types corresponding to the referenced Hibernate-mapped Java POJOs (probably because it assumes they are value types and not entity types), so it fails with an exception.
I think it would be valuable to have a final, authoritative answer about this. Thank you very much.
--
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: commits-unsubscribe@grails.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Associations between GORM entities and Hibernate entities do not work in Grails 2.5.5 [grails-core]
Posted by "jdaugherty (via GitHub)" <gi...@apache.org>.
jdaugherty closed issue #14712: Associations between GORM entities and Hibernate entities do not work in Grails 2.5.5
URL: https://github.com/apache/grails-core/issues/14712
--
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: commits-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Associations between GORM entities and Hibernate entities do not work in Grails 2.5.5 [grails-core]
Posted by "jdaugherty (via GitHub)" <gi...@apache.org>.
jdaugherty commented on issue #14712:
URL: https://github.com/apache/grails-core/issues/14712#issuecomment-2851633363
I don't believe support was ever added; what Graeme said is likely still the best answer. Grails 2 is well out of the support period of Grails at this point, so his comments are the most relevant.
--
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: commits-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org