[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-2301) Identity generator with custom insert SQL broken in 3.2

Gail Badner (JIRA) noreply at atlassian.com
Wed Apr 11 16:23:04 EDT 2007


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gail Badner updated HHH-2301:
-----------------------------

    Attachment: HHH-2301-new-testcase.patch

I have attached a patch for a new test case, HHH-2301-new-testcase.patch, that reproduces this issue for both Hypersonic and MySQL.

I've created this new test case, CustomSQLWithNativeGeneratedIdsTest, so that it will execute using the default dialect (HQLDialect). This test case extends HandSQLTest. The mapping for this test case is the same as MySQLEmployment.hbm.xml except that the native ID generator (identity) is used and it only includes those definitions used by HandSQLTest.testHandSQL().

I moved the methods in HandSQLTest that dealt with stored procedures into HandSQLWithStoredProcsTest and changed Db2SQLTest, MSSQLTest, MySQLTest, DataDirectOracleSQLTest, and OracleSQLTest to extend HandSQLWithStoredProcsTest. I did this for several reasons. I thought it best if this test run by default with HSQLDialect. Since Hypersonic stored procedures are more complicated (they must be written in Java and made accessible to the DB server), and because I felt that HandSQLTest.testHandSQL() was sufficient to test this issue, I decided that implementing this test using stored procedures was not worthwhile.

The first patch (HHH-2301-testcase.patch) can still be used with MySQL if anyone decides it is worthwhile to test using stored procedures.

Gail Badner
SourceLabs - http://www.sourcelabs.com
Dependable Open Source Systems

> Identity generator with custom insert SQL broken in 3.2
> -------------------------------------------------------
>
>                 Key: HHH-2301
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2301
>             Project: Hibernate3
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.2.1
>         Environment: JDK 1.5.0_08, Windows XP
>            Reporter: Scott Rankin
>            Priority: Critical
>         Attachments: AbstractEntityPersister.patch, HHH-2301-new-testcase.patch, HHH-2301-testcase.patch
>
>
> When an entity is defined as having custom insert sql and has a ID generator strategy of "identity", the custom insert SQL is ignored in 3.2.  This previously worked in 3.1.3. 
> More details on the forum here: http://forum.hibernate.org/viewtopic.php?t=966317

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