-->
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 with multiple join
PostPosted: Fri Jul 16, 2004 9:57 am 
Newbie

Joined: Fri Jul 16, 2004 9:43 am
Posts: 3
hi everybody


I have 28 tables "for my exemple I'll take juste 4"

table1( table1_id
table2_id
table10_id
table11_id
.......................
proprety_A
property_B
..................)


table2(table2_id
table3_id
C
D)


table3(table3_id
propetyE
.............)

table4(table4_id
table3_id
propertyG
................)

I have table per class but I need to import several data (property_A, B, C,D,E,G) so i creat a new class



myclass{
A
B
C
D
E
G
..........
}

so how should I map this class

Thanx


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 16, 2004 10:00 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
What you want is not very clear. You'll only have myclass and no other for the 4 tables?

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 16, 2004 10:06 am 
Newbie

Joined: Fri Jul 16, 2004 9:43 am
Posts: 3
I have also myclass1 for the first table myclass2 for the 2nd and so on what i want it's to map myclass with table1 ...... table4 and send just one query to obtein a list of data i need


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 16, 2004 10:16 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Do a view in your DB and map this view to MyClass

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 16, 2004 10:35 am 
Newbie

Joined: Fri Jul 16, 2004 9:43 am
Posts: 3
it works

thanx


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.