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 72135

Summary: "Cannot find symbol" error in editor for valid annotation element
Product: java Reporter: ievans <ievans>
Component: EditorAssignee: issues@java <issues>
Status: RESOLVED INVALID    
Severity: blocker    
Priority: P3    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description ievans 2006-02-01 19:10:19 UTC
The editor doesn't seem to be able to handle some valid annotation elements.

When creating Java Persistence entities, the relationship annotations
(@OneToMany, @ManyToMany, etc.) have a cascade element. Setting the cascade
element in the relationship annotation causes a "cannot find symbol" error for
the in the editor.

For example in:
@OneToMany(cascade=REMOVE, mappedBy="order")
public Collection<LineItem> getLineItems() {
    return lineItems;
}

The first line causes an editor syntax error, with the following error in the popup:
cannot find symbol
symbol: variable REMOVE
location: <source file name>

From the EJB Persistence spec:
"The cascade element specifies the set of cascadable operations that are
propagated to the associated
entity. The operations that are cascadable are defined by the CascadeType enum:
public enum CascadeType { ALL, PERSIST, MERGE, REMOVE, REFRESH};"
Comment 1 Jan Becicka 2006-05-05 13:32:32 UTC
Please attach your messages.lag
Comment 2 Jiri Prox 2007-09-12 09:25:52 UTC
No response for a long time -> closing 
If it is still reproducible, please reopen the issue and provide requested information.