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.
|