Although Hibernate supports components inside components, JSR-220 does not: "Support for only one level of embedding is required by this specification." (Chapter 2.1.5)
One could argue that although the JSR does not require it, implementations may support it. However, the orm.xml schema seems to prohibit embedded attributes inside embeddable.
I also tried annotations with embeddedable classes that have embedded attributes, but I could not get it to work. I wonder if that would work. How would the mapping look like? Something like @AttributeOverride(name="x.y", column=@Column(name="colXY")) ??
Nevertheless, our project somehow depends on this functionality. It would be nice not to use annotations because we do not have full controll of the embedded classes, but using annotations might be a back up plan.
So, what's the recommended way to do this? Mix hbm and annotations/orm.xml?
Thank you.
Markus
|