DerbyDialect javadoc

Description

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.

Environment

Hibernate 3.1.2, Derby 10.1.2.1

Activity

Show:
Steve Ebersole
December 15, 2006, 4:01 PM

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().

Out of Date

Assignee

Unassigned

Reporter

Brian Bonner

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure