]
Steve Ebersole closed HHH-1073.
-------------------------------
Closing stale resolved issues
InformixDialect can't populate inserted serial(4)
-------------------------------------------------
Key: HHH-1073
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1073
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.1 rc2
Environment: Informix 9.4 UC 3, Hibernate 3 RC2, three seperate informix drivers
Reporter: Dennis C. Byrne
Informix has serial(4) and serial(8) instead of identity fields. The correct way to get
the last assigned id is to fire "select dbinfo('serial8') from systables
where tabid=1" after an insert of a serial(8) record, or "select
dbinfo('sqlca.sqlerrd1') from systables where tabid=1" from a serial(4)
record.
The expression 'type==Types.BIGINT', in
InformixDialect.getIdentitySelectString(), will always evaluate to true, regardless of
whether the serial field is 4 or 8. Hibernate will consequently use "select
dbinfo('serial8') from systables where tabid=1" for both 4 and 8.
We have observed a similar problem w/ third party GIS software. There is another
application developed by someone here who has informed me that he does not have this
problem, but that application was written in H2.
A workaround for this is to override InformixDialect.getIdentitySelectString() and force
it to always return "select dbinfo('sqlca.sqlerrd1') from systables where
tabid=1". This however means the app would have errors w/ serial(8).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: