[GLASSFISH-20651] EclipseLink Generates DDL Statements Without Trailing Semicolon Created: 20/Jun/13 Updated: 03/Jul/14
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
|Tags:||eclipselink, fishcat, persistence|
EclipseLink generates DDL statements (CREATE TABLE, DROP Table etc.) without the trailing semicolon. The statements are so no directly usable in a CI enviromnent.
CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT DECIMAL(15), PRIMARY KEY (SEQ_NAME));
CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT DECIMAL(15), PRIMARY KEY (SEQ_NAME))
Seems like all target databases are effected.
|Comment by guypelletier [ 03/Jul/13 ]|
EclipseLink currently does not generate platform dependent terminators in DDL generation. It does however have the capability to do so and it could be achieve through a new property setting.
Can you please enter an EclipseLink bug to include this functionality?
|Comment by alexeev_net [ 06/Dec/13 ]|
I traced the problem down to the field createSQLFiles in the class SchemaManager:
In order to generate platform dependent terminators in DDL generation, this field shall be true. Unfortunately, EntityManagerFactoryProvider explicitly turns this flag to false:
As a result, every DDL statement in SQL-File is terminated with "\n" instead of platform dependent terminator.
To me it seems like there is a trivial bugfix for EntityManagerFactoryProvider, replacing mgr.setCreateSQLFiles(false) by mgr.setCreateSQLFiles(true).
|Comment by Alessandro Brandimarti [ 03/Jul/14 ]|
EclipseLink bug report: