Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-1549

Add unitName to @PersistenceContext

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • 2.1.0.Final
    • 2.0.0.Final
    • Scaffold

    Description

      The scaffolding generates this kind of code in terms of persistence context (e.g. below is for JSF) :

      @PersistenceContext(type = PersistenceContextType.EXTENDED)
      

      Because it doesn't have any unitName it takes the default one, if there is only one persistence unit. It would be better to explicitelly add the unitName so the code still deploys if there are several persistence unit. As per FORGE-1513, the persistence unit name is the project name with -persistence-unit :

      @PersistenceContext(unitName = "myproject-persistence-unit", type = PersistenceContextType.EXTENDED)
      

      Attachments

        Issue Links

          Activity

            People

              agoncal Antonio Goncalves (Inactive)
              agoncal Antonio Goncalves (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: