glassfish
  1. glassfish
  2. GLASSFISH-378

java2db generating not valid DDL script, semi-column is missing.

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 9.0pe
    • Fix Version/s: not determined
    • Component/s: entity-persistence
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      378

      Description

      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">
      <jta-data-source>jdbc/__default</jta-data-source>
      <properties>
      <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"
      value="oracle.toplink.essentials.platform.database.DerbyPlatform"/>
      <!-- <property name="toplink.logging.level" value="FINEST"/> -->
      </properties>
      </persistence-unit>
      </persistence>

      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.

      Regards,
      JB

        Activity

        Hide
        marina vatkina added a comment -

        The generated DDL is intended for JDBC execution.

        Show
        marina vatkina added a comment - The generated DDL is intended for JDBC execution.
        Hide
        bjb added a comment -

        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.

        Regards,
        JB

        Show
        bjb added a comment - 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. Regards, JB
        Hide
        marina vatkina added a comment -

        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.

        Regards,
        -marina

        Show
        marina vatkina added a comment - 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. Regards, -marina
        Hide
        Tom Mueller added a comment -

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

        Show
        Tom Mueller added a comment - Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.

          People

          • Assignee:
            pramodgo
            Reporter:
            bjb
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: