Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-1442 Scaffolding issues in Forge 2.Beta
  3. FORGE-1443

database.action property in persistence.xml should be drop-and-create

    Details

    • Type: Sub-task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.0.0.Beta4
    • Fix Version/s: 2.0.0.CR2
    • Component/s: Scaffold
    • Labels:
      None

      Description

      When you setup JPA in Forge 1.x you get :

      <property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
      

      In Forge 2.Beta instead of drop-and-create you get only create :

      <property name="javax.persistence.schema-generation.database.action" value="create"/>
      

      Instead you should have

      <property name="javax.persistence.schema-generation.database.action" value="drop-and-create"/>
      

      And by the way, why not generating the DDL script as well ? You could have :

      <property name="javax.persistence.schema-generation.database.action" value="drop-and-create"/>
      <property name="javax.persistence.schema-generation.scripts.action" value="drop-and-create"/>
      <property name="javax.persistence.schema-generation.scripts.create-target" value="<projectName>Create.ddl"/>
      <property name="javax.persistence.schema-generation.scripts.drop-target" value="<projectName>Drop.ddl"/>
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                ivan_stefanov Ivan St. Ivanov
                Reporter:
                agoncal Antonio Goncalves
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: