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 188819

Summary: Netbeans reports missing ID in JPA-annotated class
Product: javaee Reporter: codepitbull
Component: PersistenceAssignee: Sergey Petrov <sj-nb>
Status: RESOLVED INCOMPLETE    
Severity: normal    
Priority: P3    
Version: 7.0   
Hardware: PC   
OS: Mac OS X   
Issue Type: DEFECT Exception Reporter:

Description codepitbull 2010-07-21 12:33:19 UTC
I got the following scenario:
I got a base class that's annotated with @MappedSuperclass and has an @Id.
If I know extend the class everything is fine, netbeans reports everything to be valid.
Now I extend the baseclass with another class and again extend this class and netbeans reports a missing @Id.
Compiled with Maven the class works as expected as it gets the id from the first class.
I guess netbeans is not going through the full class hierarchy to determine if there is an @Id annotation.
Comment 1 Sergey Petrov 2010-08-31 14:27:31 UTC
Can you provide example project.
I can reproduce error mark, but also if I deploy application with entity->some class->mapped superclass I have runtime error, and I do not have one if it's just entity->mapped superclass. And also all is fine in netbeans and at runtime if both parents are annotated with MappedSuperClass.