I have a class that I create a Hibernate mapping that contains an obsolete object that I cannot change, so it does not have the required id field to play well with Hibernate. I would like to annotate the deprecated object as the @Embedded field of my new class and write the hbm.xml file for the deprecated object and note that it is embedded. Is there any way to do this? The only documentation for embedding objects I've seen is annotating objects, not using XML.
I understand that I could expand the deprecated object and annotate it accordingly, but this case can happen often, so I would like to avoid this if possible.
xml annotations hibernate
Dave
source share