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: Migrating increment generator to MySQL identity
PostPosted: Thu Nov 11, 2010 5:20 am 
Newbie

Joined: Thu Nov 11, 2010 5:08 am
Posts: 1
Dear all,

I'm faced with an application that uses Hibernate 3.2.0.ga with increment generator that I need to interface with. The preferred interface mechanism is to write data directly to the database that is managed by Hibernate. Alas the increment generator poses issues as it cannot be accessed or controlled from outside of Hibernate.

I have tried to change it to identity and change the underlying column to become auto increment (it is using MySQL). It seems to be working OK, meaning I can still edit and view data using the application for data that is created using both the application (through Hibernate) and from direct SQL insert. Also, the application can create a new row all right.

However I would like seek further confirmation whether such is the best way. Or if there is other preferred work-around.

The main objective is to make the table to be insertable from outside (direct SQL) whilst the application still run as usual without any change aside from the editing the hbm and issuing a DDL.

Many thanks beforehand.


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.