-->
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: How can I best use different tables for the same class?
PostPosted: Sat May 14, 2005 11:38 am 
Newbie

Joined: Sat May 14, 2005 11:19 am
Posts: 14
Hello,

I would like to store objects of the _same_ class to different tables, e.g. for providing some kind of containers on database level.

Example:
Table cars: Table with all cars.
Table modified_cars: Table with copies of cars from the above table which have been modified by a user. Cars in this table will be copied back to table cars at the end of each month.

Can I somehow specify a table name prefix when storing objects (in the above example "modified_")? Or do I better use different session factories for each container on the same database? Can I somehow reuse the mapping for the class in the second session factory though it may only contain one table name?

Can I copy objects from one container into another without problems?

Markus


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.