-->
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: Overriding identifier
PostPosted: Thu Nov 18, 2004 4:54 am 
Newbie

Joined: Mon Oct 04, 2004 5:03 pm
Posts: 5
Hibernate version:

2.1.6

Name and version of the database you are using:

mysql 4.0.22

Web application running on jboss 3.2.x with hibernate sar file. Two installations (each has own db) - each identical except that on one side the admin GUI is compiled in - on the other it is not. The hibernate config is identical on both sides.

Process - user inside uses admin GUI to control database. All hibernate classes are set with identifier to be native (which then uses MySQLs auto_increment ids as far as I can see).

When all is correctly changed - the user can then "publish" to the second installation via a SOAP connection.

So - in the internal version the use of identifier from MySQL is OK - but in the external one I need to be able to specify the id so that the two systems can synchronise.

I know I can use assigned ids but I'd like to keep the two systems as near identical as possible (all hibernate config is generated from xdoclet comments - would really like to avoid two versions).

Looking at the code - I can't figure out what will happen if an ID is present in an object passed to save() - will it be the same as MySQL where you can set the ID? I will give it a try to see if it works - but - any suggestions on a better method? Will this cause problems with future releases if I rely on it?


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.