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

Antonio Goncalves (JIRA) issues at jboss.org
Tue Feb 11 11:37:28 EST 2014


     [ https://issues.jboss.org/browse/FORGE-1549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Antonio Goncalves updated FORGE-1549:
-------------------------------------

           Status: Closed  (was: Pull Request Sent)
    Fix Version/s: 2.0.1.Final
                       (was: 2.x Future)
       Resolution: Done

    
> 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
>            Assignee: Antonio Goncalves
>              Labels: Starter
>             Fix For: 2.0.1.Final
>
>
> 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