-->
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.  [ 1 post ] 
Author Message
 Post subject: Map one object to more than one table
PostPosted: Thu Oct 27, 2005 12:01 pm 
Newbie

Joined: Tue Sep 27, 2005 8:12 am
Posts: 12
Hi,

I wonder if it is possible to map one object to more than one database tables in Hibernate.

Problem is, there are 3 tables and they correspond to one object, differ in one or two column(s).

Record from table A can be moved to table B and vice-versa (subject to some condition/event).
Record from table A can be moved to table C and vice-versa (subject to some condition/event).

At the moment I am working it with 3 POJOs and 3 mapping files. I couldn’t design it properly by making use of inheritance / interface. So making use of conversion methods.

Will be thankful if one could give some pointer in better design/solution. Further, I can’t change the tables.

Thanks


Hibernate version:Hibernate-3.1beta3


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.