Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-1505 Perform a review of Forge 2.CR
  3. FORGE-1513

persistence-unit name should not be "forge-default" but projectNamePU

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Done
    • Icon: Major Major
    • 2.0.0.Final
    • 2.0.0.CR2
    • Scaffold
    • None

      When executing the jpa-setup command, the resulting persistence.xml is :

      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      <persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.1" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
        <persistence-unit name="forge-default" transaction-type="JTA">
          <description>Forge Persistence Unit</description>
          <jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
          <exclude-unlisted-classes>false</exclude-unlisted-classes>
          <properties>
            <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="pluralsight-persistenceCreate.ddl"/>
            <property name="javax.persistence.schema-generation.scripts.drop-target" value="pluralsight-persistenceDrop.ddl"/>
          </properties>
        </persistence-unit>
      </persistence>
      

      The persistence unit name in this case should be pluralsight-persistencePU instead of forge-default. This is just the project name concat with PU (in the persistence.xml there is already the project name for the DDL files, it's just a matter of having the same semantic)

              lincolnthree Lincoln Baxter III (Inactive)
              agoncal Antonio Goncalves (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: