-->
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: Possible to map one-to-(one or none)?
PostPosted: Mon Nov 13, 2006 6:23 pm 
Newbie

Joined: Mon Jul 24, 2006 3:21 pm
Posts: 14
I have a situation where I need to map a one-to-(one or none). Is that possible in Hibernate (other than just using a one-to-many and always grabbing the first element in the Set)?

For example, if I have a table of a bunch of Person records and I want to have a foreign key field to say who is directly in front of each person in line (and who is behind each person), how would I do it?

Many thanks to any helpful idea givers,
Josh

P.S. Is it possible to say that a 'Set' on a one-to-many has a limited size? If so, I could use this feature and limit the set size to 1, I guess.


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.