| 
					
						 I was curious if anyone out there has ever done a task like this. I have four database instances called dev, test, stage and prod. Each instance has it's own data. I have a requirement to insert new data in dev. I then need to programatically migrate the data, using struts/hibernate, from dev to test, test to stage, and stage to prod. Here's the hard part: I need to ensure the primary keys are the same in each environment. I've read the docs on the metadata xml id tag and the use of the generator tag. I think I have two options: 1) have a different set of mapping files in dev. Dev will use a generator class to manage the primary key sequencing. The mapping files in the other environments will be the same except they will use a generator type 'assigned'. 2) My other option is to use session.save( object, id ) where the 'id' is the primary key I want to insert. Does anyone have any thoughts about this?
 
 Cheers,
 Greg
 
 Hibernate version:3.0 
 
 Mapping documents:
 
 Code between sessionFactory.openSession() and session.close():
 
 Full stack trace of any exception that occurs:
 
 Name and version of the database you are using:oracle 9.2
 
 The generated SQL (show_sql=true):
 
 Debug level Hibernate log excerpt: 
					
  
						
					 |