-->
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: selecting dfefault value from a one-to-many collection
PostPosted: Fri Jun 19, 2009 11:22 am 
Newbie

Joined: Fri May 01, 2009 5:41 pm
Posts: 2
I've been dealing with this for a few days now without success. I have a customer object with a collection of addresses. I'm mapped the usual one-to-many relationship successfully so that a customer has a set of addresses.

I also have a requirement where I need to only get the default address (marked with a flag on the address field) from the collection and map it to a seperate address property on the customer. I would like to do this in the mapping. I tried the example shown here:
http://www.onjava.com/pub/a/onjava/2005/08/03/hibernate.html?page=3 but it does not work at all. Does anyone have any other opproaches of returning just one item from a one-to-many collection.

Thank you very much


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.