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 97623 - Heuristic Rules for Code Generation
Summary: Heuristic Rules for Code Generation
Status: RESOLVED DUPLICATE of bug 81208
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-11 06:54 UTC by gamelol
Modified: 2008-05-20 23:31 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gamelol 2007-03-11 06:54:42 UTC
JPA and Entity Classes from Database could use some customization.  For 
example,

Employer(employerOid,name)
Employeee(employerOid,employeeOid,name)

results in 2 classes, Employer and Employee.

Employer Employee.getEmployerOid()

The above naming is a bit ugly.  It would be nice if there was a way to 
specify instead of getEmployerOid(), the method should be called getEmployer().

A template mechanism for code generation would be nice.

Also, there should be a way to specify to have either or, or both

1. Employer Employee.getEmployer()
2. String Employee.getEmployerOid()

Method 2 could be convenient when only the employerOid is needed and not the 
full Employer structure. This could improve performance.

Thanks...
Comment 1 Rochelle Raccah 2007-03-12 22:59:26 UTC
Note that I believe naming was like the proposal at one time (or maybe it was 
in transparent persistence) but there are issues with the proposal in the case 
of multiple relationships.
Comment 2 Dongmei Cao 2008-05-20 23:31:07 UTC

*** This issue has been marked as a duplicate of 81208 ***