Community
Participate
Working Groups
Build Identifier: 2.1.1 See bug 297198: The solution breaks with HSQLDB 2.x. Version 1.8.x requires a comma between "START BY 1" and "INCREMENT BY 1", while version 2.x complies with SQL:2008 and does not accept the comma. The previous fix added the unnecessary "INCREMENT BY 1" (increment is 1 by default). If this is removed, it will work with all versions of 1.8.x and 2.x. The method should be altered as follows: public void printFieldIdentityClause(Writer writer) throws ValidationException { try { writer.write(" GENERATED BY DEFAULT AS IDENTITY (START WITH 1)"); } catch (IOException ex) { throw ValidationException.fileError(ex); } } Reproducible: Always
The best way to work around this issue is to subclass the HSQL platform and include the method provided above. The fix for this bug will involve inclduing a subclass such as the one describe above in the product and where possible enabling autodetection of it.
This fix will work with HSQLDB 1.8.x and 2.x and all future versions if it is applied to the current platform -- does not need subclassing. Subclassing the HSQL platform would be a good idea regadless of this. HSQLDB 2.x is very feature rich and standards compliant compared to 1.8.x. Main areas where subclassing will be of benefit are: - transaction support for READ COMMITTED and SERIALIZABLE - support for real, multithreaded MVCC with configurable behavior on data change conflict (rollback action or rollback transation) - new data types cover full SQL:2008 foundation (BLOB, CLOB, WITH TIME ZONE, INTERVAL - fine grained configuration properties for relaxing SQL conformance and syntax and behavior compatibility with other SQL products Adding platform support for the new features will extend test coverage of JPA features in EclipseLink I can help with the implementation to auto-discover various settings for maximum flexibility. Please start a Bugzilla item if you want to go ahead and I will participate and attach patches if necessary.
Setting target and priority. See the following page for the meanings of these fields: http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines Community: Please vote for this bug if it is important to you. Votes are one of the main criteria we use to determine which bugs to fix next.
Backward compatibility has been added in HSQLDB 2.2.6 to work with the legacy syntax.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink