[forge-issues] [JBoss JIRA] (FORGE-1549) Add unitName to @PersistenceContext

Antonio Goncalves (JIRA) issues at jboss.org
Sun Feb 2 15:26:28 EST 2014


Antonio Goncalves created FORGE-1549:
----------------------------------------

             Summary: Add unitName to @PersistenceContext
                 Key: FORGE-1549
                 URL: https://issues.jboss.org/browse/FORGE-1549
             Project: Forge
          Issue Type: Feature Request
          Components: Scaffold
    Affects Versions: 2.0.0.Final
            Reporter: Antonio Goncalves
             Fix For: 2.x Future


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

{code}
@PersistenceContext(type = PersistenceContextType.EXTENDED)
{code}

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}} :

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


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the forge-issues mailing list