-->
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.  [ 5 posts ] 
Author Message
 Post subject: mapping question
PostPosted: Fri Apr 16, 2004 12:13 pm 
Newbie

Joined: Fri Apr 16, 2004 11:53 am
Posts: 7
Hi,

I am very new to hibernate, here is my problem.


I have a class like this

class Foo {

String a;

String b;

String c;
String d;
}


a and b are in one table (say tableA) while c and d are in another table (tableB). Rigth now without hibernate, we are using a sql like

select tableA.a ,tableA.b, tableB.c ,tableB.d from tableA, tableB where tableA.a = tableB.a


now with hibernate, how to map this relationship? how to define the mapping file?

Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 16, 2004 12:16 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Spreading one class out over multiple tables is currently not possible.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 16, 2004 1:19 pm 
Newbie

Joined: Fri Apr 16, 2004 11:53 am
Posts: 7
michael wrote:
Spreading one class out over multiple tables is currently not possible.


thanks, miahael.

will this feature be added in 2.2?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 16, 2004 10:57 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
It was already added.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 20, 2004 9:13 am 
Newbie

Joined: Fri Apr 16, 2004 11:53 am
Posts: 7
already added? in which version? where can I get that version?

thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.