-->
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.  [ 2 posts ] 
Author Message
 Post subject: how to do one-direction one-to-one mapping
PostPosted: Sun Jun 01, 2008 8:06 pm 
Newbie

Joined: Wed Nov 29, 2006 12:27 am
Posts: 7
hi

if i have two table

table a {
id int primary key
content varchar
}

table b {
id int pk,
content varchar,
a_id reference a(id)
}

how can i do the mapping so that
a can a.getB
but b can not b.getA???

what should i specify in the hbm.xml file???


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 02, 2008 1:24 am 
Expert
Expert

Joined: Tue Jan 30, 2007 12:45 am
Posts: 283
Location: India
Try this one

<one-to-one name="person"
property-ref="address"/>

_________________
Dharmendra Pandey


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

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.