-->
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: Single POJO to point to different tables in Database runtime
PostPosted: Wed Aug 18, 2010 7:53 am 
Newbie

Joined: Thu Jul 08, 2010 3:54 am
Posts: 4
Is it possible to map one single POJO class to point to different database tables at runtime?


Top
 Profile  
 
 Post subject: Re: Single POJO to point to different tables in Database runtime
PostPosted: Wed Aug 18, 2010 4:41 pm 
Newbie

Joined: Tue Aug 17, 2010 3:29 pm
Posts: 12
Normally this case should never occur. I think it is not possible. if you do it you will get duplicate mapping exception i guess. I am curious to know why you need to do this?


Top
 Profile  
 
 Post subject: Re: Single POJO to point to different tables in Database runtime
PostPosted: Thu Aug 19, 2010 7:25 am 
Newbie

Joined: Tue Jul 20, 2010 1:53 am
Posts: 18
Yes possible .. in hibernate.cfg.xml file you have to mention the other database details . .

<DOC TYPE................../>
<hibernate-configuration>
<session-factory>
<property name="class.......... (in oracle)


</session-factory>

<session-factory>
<property name="provider_class . . . ......(MySQL) database


</session-factory>
</hibernate-configuration>



like that you mention .


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.