-->
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: How to move object from one to another database-same schema
PostPosted: Fri Jun 29, 2007 8:55 am 
Newbie

Joined: Sun Jun 17, 2007 4:01 pm
Posts: 5
Problem context:
- 2 databases with same schemas
- need to move objects (data) from one database to another using hibernate

Question(s)
- how to perform that properly? is it possible to read object from one database and write the same object to another database? how to prepare mapping descriptors? how to set table and schema in hibernate-mapping?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 29, 2007 10:27 am 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
hibernate.ddl can create tables and schema and stuff
session.replicate will copy over generated primary keys for you

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 02, 2007 4:31 am 
Newbie

Joined: Sun Jun 17, 2007 4:01 pm
Posts: 5
kochcp wrote:
hibernate.ddl can create tables and schema and stuff
session.replicate will copy over generated primary keys for you


But I will need to use two different datasources...so how can I use session.replicate?
Could U give me some more details?


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.