Nested embedded GORM

I am in the process of exporting a Spring (and Hibernate) application to Grails.

Using GORM, I would like to do the following:

class A { B b static embedded = ['b'] } class B { C c static embedded = ['c'] } class C { } 

And received:

org.hibernate.MappingException: could not determine the type for: C, at table: a, for columns: [org.hibernate.mapping.Column (b_c_id)]

I know that I can use the old Hibernate mapping files (which, incidentally, successfully use the Hibernate component tag), but still:

Is the β€œinline” function limited to one level? How can I get around or fix this?

+4
source share
1 answer

This is a known grail error. There is also a bug report http://jira.codehaus.org/browse/GRAILS-2773 . Unfortunately, none of the Grails team have answered yet.

The easiest way to fix this is to use the old Hibernate mapping file. I currently have no other solution. Unfortunately.

+2
source

All Articles