I am using JPA through Hibernate. I prefer using XML metadata rather than in-line tags. That's not a problem.
I am using the embedding of a class within another class. This is documented in JPA specification. However, it is not clear from the documentation that JPA/Hibernate supports multi-level embedding (<embedded>). In other words, I am embedding class C into class B and class B into class A ( C->B->A). That's a 3-level embedding.
It's unfortunage that the documentation does not speak of the possibility.
Can somebody from Hibernate/JPA clarify whether this feature is supported or not? An example XML configuration file would be best. I would really appreciate it.
I tried it and might be getting an error from it. Remember that native Hibernate had an additional tag / XML element to do this. In native Hibernate, there was <component> <embedded-component> for embedding several levels of classes.
JPA/Hibernate is silent on this possiblity.
|