[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2065?page=c...
]
Bill Gong commented on HHH-2065:
--------------------------------
It happens also in my case, which is Hibernate 3.1.3 + Derby
object primary key with increment option + hsqldb + multiple schemas
--------------------------------------------------------------------
Key: HHH-2065
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2065
Project: Hibernate3
Type: Bug
Components: core
Versions: 3.1.3
Environment: This bug was discovered using Hibernate 3.1.3 and hsqldb 1.8.0.1. It was
also reproduced using hsqldb 1.8.0.5.
Reporter: jojo
Original Estimate: 2 hours
Remaining: 2 hours
How to reproduce the bug:
1. Use Hibernate 3.1.3 + hsqldb 1.8.0.x
2. Create an hsqldb database (file or memory) and create a table on a named schema
(let's say MYSCHEMA.MYTABLE)
3. Map this table with a POJO+hibernate mapping file and setup its primary key id with
"increment" option (of course don't forget to set schema name in your
mapping).
4. Create an instance of this object without giving him an id and try to save it :
=> The problem appears when trying to get MAX(ID) of MYTABLE. Indeed, the schema name
is not taken into account. The underlying sql request that should be : SELECT MAX(ID) FROM
MYSCHEMA.MYTABLE, is SELECT MAX(ID) FROM MYTABLE which cause errors.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira