-->
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: OnetoOne doesn't work for self reference, object inheritance
PostPosted: Mon Apr 21, 2008 2:00 pm 
Newbie

Joined: Sun Apr 06, 2008 2:49 pm
Posts: 17
Hi,

I have two db tables:
A
long aID; (pk)
string addInfo1;

B (this doesn't have a column for hibernate id, only foreign primary key)
long baID; (pfk) (oneToOne to A object)
string addInfo2;

In the class model are two classes - A and B.
B inherits A, B : A


A
long aID
string addInfo1;

B : A
string addInfo2

How could I map it so that it would work?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 22, 2008 1:42 am 
Regular
Regular

Joined: Fri Feb 18, 2005 3:34 am
Posts: 88
Location: Poland/Wrocław
Use <joined-subclass>. This is the typical case for you.

_________________
Please rate this post if you've found it helpfull
Roland


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.