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 242442 - Could not be generated a JPA Controller class from an Entity class with methods
Summary: Could not be generated a JPA Controller class from an Entity class with methods
Status: NEW
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 7.4
Hardware: PC Linux
: P2 normal (vote)
Assignee: Sergey Petrov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-28 10:13 UTC by cagcak
Modified: 2014-02-28 10:15 UTC (History)
0 users

See Also:
Issue Type: TASK
Exception Reporter:


Attachments
Successfuly generated Entity and Controller Classes by NetBeans (3.26 KB, application/x-rar)
2014-02-28 10:13 UTC, cagcak
Details
unsuccessfuly generated Entity and Controller Classes by NetBeans (1.23 KB, application/x-rar)
2014-02-28 10:14 UTC, cagcak
Details
Designs of tables which are releated to the classes (125.24 KB, application/x-rar)
2014-02-28 10:15 UTC, cagcak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cagcak 2014-02-28 10:13:24 UTC
Created attachment 145655 [details]
Successfuly generated Entity and Controller Classes by NetBeans

NetBeans cannot generate a JPA controller class from the entity class by default methods. An error returns 'xxxx.xxxx.Users: could not find id property. Be sure the accessor method name matches the variable name'.
The database table 'USERS' for the Entity class, which is generated by NetBeans, has two fields in VARCHAR type, and one of them is primary key. The other Entity classes, which have id fields in INT property, let NetBeans generates controller classes successfully with default methods. I've attached two controller classes with their entity classes, one is for successfully generated (GeneralInfo.java ---> GeneralInfoJpaController.java), and the other one is that could not be generated (Users.java ---> UsersJpaController.java), and of course the table designs.
Comment 1 cagcak 2014-02-28 10:14:29 UTC
Created attachment 145657 [details]
unsuccessfuly generated Entity and Controller Classes by NetBeans
Comment 2 cagcak 2014-02-28 10:15:55 UTC
Created attachment 145658 [details]
Designs of tables which are releated to the classes