[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-1915) DerbyDialect javadoc

Steve Ebersole (JIRA) noreply at atlassian.com
Fri Dec 15 09:02:04 EST 2006


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1915?page=comments#action_25638 ] 

Steve Ebersole commented on HHH-1915:
-------------------------------------

Because our test suite shows problems running against Derby using IDENTITY columns.  It almost as if in certain circumstances the just inserted IDENTITY value is not available when performing a later FK check in the same transaction.

For example, in the same connection/transaction, the following paradigm fails often:

insert into Employee (id) values (default)
{generatedEmployeeId} = values identity_val_local()
insert into Employer (id)  values (default)
{generatedEmployerId} = values identity_val_local()
insert into EMPLOYER_EMPLOYEE (EMPER_ID, EMPEE_ID)  values ( {generatedEmployerId}, {generatedEmployeeId}  )

this last insert fails with an FK constraint violation.  This happens whether we make the "values identity_val_local()" call seperately or whether we use getGeneratedKeys().


> DerbyDialect javadoc
> --------------------
>
>          Key: HHH-1915
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1915
>      Project: Hibernate3
>         Type: Improvement

>   Components: documentation
>     Versions: 3.1.2
>  Environment: Hibernate 3.1.2, Derby 10.1.2.1
>     Reporter: Brian Bonner

>
>
> Hibernate 3.1.2's DerbyDialect seems to work around some issues in Derby's JDBC 3.0 Support, but it's not clearly documented in the Javadoc why it is the case.
> For example:
> Derby does support Identity columns  (http://db.apache.org/derby/docs/10.1/ref/rrefidentityvallocal.html) and it looks like the Dialect includes this, but then it uses the TableHiLoGenerator instead of the IdentityGenerator.
> I assume it's to work around this problem:
> http://forum.hibernate.org/viewtopic.php?t=951233&highlight=derby+native
> but I can't say for certain.  
> I've created a JIRA on Derby:  https://issues.apache.org/jira/browse/DERBY-1518  for the preparedStatement issue highlighted here, with the assumption that this is the reason.

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