glassfish
  1. glassfish
  2. GLASSFISH-20797

JPA Schema Generation Properties not creating scripts

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: entity-persistence
    • Labels:
      None

      Description

      I've a sample to try script generation using JPA 2.1 javax.persistence.* properties:

      https://github.com/arun-gupta/javaee7-samples/tree/master/jpa/schema-gen-scripts-generate

      persistence.xml looks like:

      <persistence
          version="2.1"
          xmlns="http://xmlns.jcp.org/xml/ns/persistence"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
       &nb sp;<persistence-unit name="MyPU" transaction-type="JTA">
          <properties>
            <property name="javax.persistence.schema-generation.scripts.action" value="drop-and-create"/>
            <property name="javax.persistence.schema-generation.scripts.create-target" value="file:/tmp/create.sql"/>
            <property name="javax.persistence.sche ma-generation.scripts.drop-target" value="file:/tmp/drop.sql"/>
          </properties>
        </persistence-unit>
      </persistence>
      

      persistence.xml defines the drop and create scripts to be generated at /tmp/create.sql and /tmp/drop.sql. But there is
      neither an error in GlassFish log nor the scripts are generated.

        Activity

        Hide
        Ed Bratt added a comment -

        Assigned FYI...

        Show
        Ed Bratt added a comment - Assigned FYI...

          People

          • Assignee:
            Srini
            Reporter:
            arungupta
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: