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 90240 - @Embedded should not be marked (with the red squiggley) indicating compilation error.
Summary: @Embedded should not be marked (with the red squiggley) indicating compilatio...
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 5.x
Hardware: Other All
: P3 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords:
Depends on: 95534
Blocks:
  Show dependency tree
 
Reported: 2006-11-29 05:56 UTC by varunrupela
Modified: 2008-07-21 23:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
unzip the sample attached. (12.12 KB, application/x-compressed)
2006-11-29 05:58 UTC, varunrupela
Details

Note You need to log in before you can comment on or make changes to this bug.
Description varunrupela 2006-11-29 05:56:46 UTC
If a embedded field is annotated with @Embedded, its type (the embeddable class)
may have been mapped as a Embeddable class using either annotations or via a
orm.xml file. Currently, if the embeddable class is not annotated with
@Embeddable the red squiggley, indicating a compilation error, appears under the
@Embedded annotation. The tool tip on this error says "target type of this
field/property is not annotated as @Embeddable."
- The project actually (and correctly) compiles without errors.

The red squiggley must be replaced with a warning squiggley since the embeddable
class can be mapped as Embeddable via a orm.xml mapping file. Else, this can
confuse a user when there is really no compilation error.

A sample application is attached. Please open the file EmbeddingEntity.java in
netbeans to see the red squiggley under the @Embedded annotation. Kindly resolve
the dependency on javaee.jar (part of glassfish) and the JavaDB library.
Comment 1 varunrupela 2006-11-29 05:58:42 UTC
Created attachment 36346 [details]
unzip the sample attached.
Comment 2 Tomasz Slota 2007-02-15 11:13:03 UTC
Just to clarify: we use the same error icon to denote a compilation, deployment and a runtime error. We 
are talking about deployment errors here.

The problem is that some of our checks are taking into account annotations only rather than the merged 
annotation/XML descriptor model. The proper fix is to always use the merged model. 

In this particular case we should be showing an error if the class is *neither* annotated as @Embeddable 
*nor* set to be embeddable in orm.xml.

Comment 3 Dongmei Cao 2008-07-21 23:14:37 UTC
This is a pretty old bug. I just opened the attached project and did not see the red squiggley any more. Must have got
fixed with other things. Mark it as "FIXED"