Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 360841

Summary: NamedQuery is not read by JPA details when there is NamedQueries used
Product: [WebTools] Dali JPA Tools Reporter: Jiri Peterka <peterka.jiri>
Component: JPAAssignee: Neil Hauge <neil.hauge>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: geraskov, neil.hauge
Version: 3.0.1   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:
Attachments:
Description Flags
Query1 missing none

Description Jiri Peterka CLA 2011-10-13 10:51:52 EDT
Try this:
1. Create JPA project
2. Create JPA entity
3. Add this named queries

@NamedQuery(name = "query1", query = "select f from Dog f")
@NamedQueries(value = { @NamedQuery(name = "query2", query = "select f from Dog f"), @NamedQuery(name = "query3", query = "select f from Dog f") })

In JPA Details there are only visible query2 and query 3, query1 is missing

Comment @NamedQueries, query1 is back

Expected is that all queries are shown
Comment 1 Jiri Peterka CLA 2011-10-13 10:52:48 EDT
Created attachment 205134 [details]
Query1 missing
Comment 2 Neil Hauge CLA 2011-10-14 15:48:22 EDT
This usage is somewhat debatable, even though I suppose most implementations support it.  Have you actually seen this used in the field, or is this more of a hypothetical situation?
Comment 3 Dmitry Geraskov CLA 2011-10-17 07:50:56 EDT
I guess the behaviour is not described in JPA specification, and the plugins implementation should be like in JPA library implementation (determined by the selected platform).