-->
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: Persist a same Class in diferent tables
PostPosted: Fri Sep 16, 2005 10:22 am 
Newbie

Joined: Tue Sep 13, 2005 7:22 am
Posts: 2
Hi, it's possible to save a unique class in diferent tables?¿
In my case i need to save a same class, called Message, in diferent tables. If the Object Message is processed bya method of the class 1 it must be saved in the table "class1" if it's processed by the class 2 save it in the table "class2" ang go on.
I think to make diferent hbm file for each "processing class" and copying the attributes from the class Message to the class that process the data, but i think that's so dirty and it must be a cleanest way. Any idea?¿


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 16, 2005 11:51 am 
Beginner
Beginner

Joined: Tue Jun 28, 2005 4:33 pm
Posts: 21
If you're using Hibernate 3.x, try using entity-name in the mapping.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 16, 2005 6:18 pm 
Beginner
Beginner

Joined: Thu Sep 15, 2005 4:16 pm
Posts: 29
You could use two session factories and have a different mapping in each.


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.