This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 91714

Summary: Update Use Entity Manager action
Product: javaee Reporter: Jan Stola <jstola>
Component: PersistenceAssignee: Erno Mononen <emononen>
Status: RESOLVED FIXED    
Severity: blocker CC: abadea, arseniy, pjiricka
Priority: P2 Keywords: API
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: TASK Exception Reporter:
Bug Depends on:    
Bug Blocks: 91757    

Description Jan Stola 2007-01-03 09:25:55 UTC
Use Entity Manager action generates field for EntityManagerFactory
and generates a sample method showing how to use the factory. It doesn't
generate a new field if the class already contains a field for 
EntityManagerFactory - that's good, but it generates a field for a factory
even if the class already contains a field for the EntityManager itself
(which is common in J2SE application). Please, don't generate a field
for a factory in that case and make sure that the generated sample method
uses the existing entity manager.
Comment 1 Erno Mononen 2007-03-29 14:59:17 UTC
I've update the action in the merged_model branch to use an existing 
EntityManager if there is one. I'll leave this issue open till the 
branch has been merged to trunk. 
Comment 2 Erno Mononen 2007-04-17 17:32:28 UTC
Closing as the branch has been merged to trunk now.