Hi all!
Is anyone using Hibernate to connect to Sybase? We still encourage some strange behaviour.
Our main problem is special customer data model. Instead of using IDENTITY column types for generating of IDs, there exist triggers which retrieves the values and populates required columns. However we whatever we tried, we still received an error.
If we define ASSIGNED generator, the hibernate does not retrieve correct ID value from the database after insert. We tried to flush or refresh but without success. Probably we could use find but this could cost a lot.
If we define IDENTITY generator, we can see the error:
net.sf.hibernate.JDBCException: could not insert: [hb.test.Person]: The column person_PK in table person does not allow null values.
It seems like hibernate creates statement to insert also ID column as NULL what is not acceptable to DB.
We also tried NATIVE generator but the errors remain.
Has anyone any ideas/experience with such a functionality? I think on Oracle this would mean the same if a man uses sequence generator.
|