[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5829) Incorrect sequence handling when Derby Client Driver is used.

Juraj Burian (JIRA) noreply at atlassian.com
Mon Jan 10 06:03:05 EST 2011


Incorrect sequence handling when Derby Client Driver is used.
-------------------------------------------------------------

                 Key: HHH-5829
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5829
             Project: Hibernate Core
          Issue Type: Bug
          Components: core
    Affects Versions: 3.6.0
         Environment: any os, Derby: ClientDriver
            Reporter: Juraj Burian


Problem is in Derby Dialect version checking.
Pls. see: https://issues.apache.org/jira/browse/DERBY-4961

Briefly: 
incorrect usage of class: org.apache.derby.tools.sysinfo for retrieving of version info.
In my opinion, the best way is to skip version check in method:

@Override
	public String getSequenceNextValString(String sequenceName) {
		if ( supportsSequences() ) {
			return "values next value for " + sequenceName;
		}
		else {
			throw new MappingException( "Derby does not support sequence prior to release 10.6.1.0" );
		}
	}

better solution may be hard, because live connection is necessary (see 1) bellow), or two calls for get...Version() method, (see 2):

(comment from DERBY-4961)
The supported ways to get the version of the client driver are:

1) Use the getDriverMajorVersion() and getDriverMinorVersion() methods in java.sql.DatabaseMetaData.

2) Call the variants of sysinfo.getMajorVersion() and sysinfo.getMinorVersion() that take a String argument. The argument should be the value found in the constant sysinfo.CLIENT.


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