]
Antonio Goncalves updated FORGE-1549:
-------------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request:
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: