Hi NG!
I want to use an embeddable object, that contains a collection (aka an association) to entity-objects.
This should work, because hibernate_annotations.pdf says:
"While not supported by the EJB3 specification, Hibernate Annotations allows you to use association annotations in an embeddable object (ie @*ToOne nor @*ToMany). To override the association columns you can use @AssociationOverride."
So I made the appropriate annotations and generate DDL with the hibernate-tool hbm2ddl, which looks quite nice.
Because my target-platform is JDK 1.4 only, I also need hibernate-mapping-files.
If I generate mapping-files out of my annotations the result of hibernate-tool hbm2hbmxml only shows:
<component name="personsDelegate" class="PersonsDelegate">
<!-- TODO -->
</component>
I can't figure out what to put in the component-tag, to make the thing work. Can anyone point me to examples of the use of association annotations in embeddable objects?
Regards,
Berti
|