-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: embeddable object that contains collection of entities
PostPosted: Fri Aug 03, 2007 8:42 am 
Newbie

Joined: Mon Jul 16, 2007 6:26 am
Posts: 13
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.