-->
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: Same class for Multiple tables
PostPosted: Mon Jul 05, 2004 10:16 am 
Newbie

Joined: Fri Jul 02, 2004 6:47 am
Posts: 12
Hi,
I have multiple table which have same struture and are used in a similar fashion. Is there a way by which I can use one java class to Map multiple tables?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 05, 2004 10:23 am 
Beginner
Beginner

Joined: Wed Sep 17, 2003 10:43 am
Posts: 48
You can use the table-per-concrete-class mapping strategy; see Chapter 8. Inheritance Mapping for more on the subject and available choices


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 05, 2004 10:32 am 
Newbie

Joined: Fri Jul 02, 2004 6:47 am
Posts: 12
sorry I didnt get you. As the name suggests you need to create a concrete class per table, then how can I use a single class.
Please elaborate.


Thanks in advance


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 05, 2004 10:49 am 
Beginner
Beginner

Joined: Wed Sep 17, 2003 10:43 am
Posts: 48
Sorry for not being clearer but if you read that part, you'll see you can use an interface as the one class your after. Interfaces can be used in a query etc


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 05, 2004 12:43 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
This is possible in Hibernate3, not in 2.1.


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.