[GLASSFISH-378] java2db generating not valid DDL script, semi-column is missing. Created: 09/Mar/06  Updated: 06/Mar/12

Status: Open
Project: glassfish
Component/s: entity-persistence
Affects Version/s: 9.0pe
Fix Version/s: not determined

Type: Improvement Priority: Major
Reporter: bjb Assignee: pramodgo
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: All
Platform: All

Issuezilla Id: 378


Having the following :

<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence">
<persistence-unit name="test" transaction-type="JTA">
<property name="ddl-generation" value="dropandcreate"/>
<property name="create-ddl-jdbc-file-name" value="create.sql"/>
<property name="drop-ddl-jdbc-file-name" value="drop.sql"/>
<property name="toplink.platform.class.name"
<!-- <property name="toplink.logging.level" value="FINEST"/> -->

And looking at the generated create.sql, each SQL statement are not separated by
a semi-column (, thus the generated DDL script is not valid and can not be
exacuted without manual correction by adding the missing semi-column.

This problem is existing on Derby, but it is anticipated that other java2db
flavor are behaving like that ! Please, fix this issue on derby and then double
check on other platforms as well.


Comment by marina vatkina [ 09/Mar/06 ]

The generated DDL is intended for JDBC execution.

Comment by bjb [ 09/Mar/06 ]

Tnx for the quick review of this issue.

I am sorry to insit, but if I copy paste this in a JDBC tool like SquirreL SQL,
the Derby JDBC database driver indicates the synthax is bad ! So, for me this is
not valid JDBC code. Am I missing something here ?

Having the semi-column (and in general a valid DDL script) will definitively
help people to do rapid development with Glassfish. Because it will help with
interroperability between glassfish artefacts and other tools.

So please reconsider fixing this. Maybe you can push this under "enhancement",
if you preffer ... although I do personally consider a DDL not beeing able to be
executed outside of GF as an issue.


Comment by marina vatkina [ 09/Mar/06 ]

Let's have it as an enhancement. Actually for CMP we generate 2 sets of files -
one for jdbc execution and one for command- or tool-based, but we didn't have
time to make major changes in TopLink code to allow that.


Comment by Tom Mueller [ 06/Mar/12 ]

Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.

Generated at Tue Feb 28 13:06:19 UTC 2017 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.