-->
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.  [ 4 posts ] 
Author Message
 Post subject: How to map multiple tables to one class
PostPosted: Tue Sep 27, 2005 6:05 pm 
Newbie

Joined: Tue Sep 27, 2005 6:00 pm
Posts: 4
Is there a way to map fields from several tables to one pojo class? Can this be done so that only one sql statement is ran to retrieve the data for the class?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 27, 2005 8:05 pm 
Senior
Senior

Joined: Wed Jul 13, 2005 4:31 pm
Posts: 142
Location: Seattle, WA
Take a look at join -

http://www.hibernate.org/hib_docs/v3/reference/en/html/mapping.html#mapping-declaration-join


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 28, 2005 12:30 am 
Newbie

Joined: Wed Sep 28, 2005 12:24 am
Posts: 15
what about the opposite. I have 4 objects that make up single database table. How do I do that?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 28, 2005 2:45 am 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
http://www.hibernate.org/hib_docs/v3/reference/en/html/mapping.html#mapping-declaration-subclass


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