[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2065) object primary key with increment option + hsqldb + multiple schemas
Bill Gong (JIRA)
noreply at atlassian.com
Thu Sep 21 18:49:24 EDT 2006
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2065?page=comments#action_24579 ]
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.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list