-->
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: list association example
PostPosted: Mon Oct 11, 2004 10:02 am 
Newbie

Joined: Sun Oct 10, 2004 4:53 pm
Posts: 1
I'm trying to set up a unidirection one to many list association in my application. I've read that hibernate should handle populating the index column automatically, but when I tried it this was not happening. I've read that when using a bidirectional association the index has to be maintained manually (again, currently using unidirectional), so I tried this and it did work.

I wouldn't post here, but I downloaded just about every example application I can find from the external example apps page (http://www.hibernate.org/27.html) and have not found 1 example of a list being used in an association. Does anybody have a simple example of this? I'd like to see one that works as expected (hibernate handles index column) and compare those settings to my settings.

Also, in this type of relationship, how would the foreign key be set on the many end of the association? Is there any way to get that populated simply by added the entity to the list? After adding code to manually handle the list index, the code was still bombing because the foreign key was null.

Basically, it seems like something in my mapping is making it look like a bidirectional relationship, even though its set up as a single.


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.