-->
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 to work with entity-name on Insert?
PostPosted: Mon Dec 10, 2007 5:06 am 
Newbie

Joined: Wed Jan 31, 2007 9:55 pm
Posts: 16
From the link: https://listman.redhat.com/docs/manuals ... _once.html

It seems I can map a class to two different tables (e.g. one is online and one is history table with same scheme).

The problem is if I insert records into the db, how can hibernate know where table to insert the data?

Here's my code of DAO that I'm using Hibnernate 3.1.2 and Spring 2:

quote.setId(1)
quote.setValue(AB);
getHibernateTemplate().add(quote);

Also, I have some cases to add with Collection of quote objects.

Thanks a lot!


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.