[forge-issues] [JBoss JIRA] (FORGE-1549) Add unitName to @PersistenceContext
George Gastaldi (JIRA)
issues at jboss.org
Mon Feb 10 16:31:28 EST 2014
[ https://issues.jboss.org/browse/FORGE-1549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
George Gastaldi updated FORGE-1549:
-----------------------------------
Assignee: Antonio Goncalves
> 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.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