-->
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.  [ 3 posts ] 
Author Message
 Post subject: One Class mapped to Two Tables
PostPosted: Wed Jul 11, 2007 10:13 pm 
Beginner
Beginner

Joined: Tue Jun 26, 2007 2:31 pm
Posts: 21
I have a problem, is there a solution in hibernate where we can map one class to two tables...if i do so it gives me an error..same class ,mapped to two different tables...is there any solution for this kind of situation.if so please give me an example how to specify it in the mapping file.

Thank you.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 12, 2007 5:28 am 
Senior
Senior

Joined: Thu May 17, 2007 2:31 am
Posts: 194
Location: Sri Lanka
Hi

Can you explain your requirment using actual situation.


Amila


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 12, 2007 7:23 am 
Beginner
Beginner

Joined: Tue Jun 26, 2007 2:31 pm
Posts: 21
I have a situation where i have a single class(Rate) that should be ,mapped to two tables One(EmployeeRate),Two(EmployerRate)...I should use only one class...but hibernate should recognize which table it has to update automatically. How can i deal with this kind of situation.What should i specify in the mapping file.


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