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 240497 - Wrong warning for collection-valued path in a named query (JPQL).
Summary: Wrong warning for collection-valued path in a named query (JPQL).
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: Sergey Petrov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-15 14:13 UTC by Juergen.Zimmermann
Modified: 2014-01-16 13:26 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Testcase with named query (114.66 KB, application/x-zip-compressed)
2014-01-15 14:32 UTC, Juergen.Zimmermann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen.Zimmermann 2014-01-15 14:13:51 UTC
The following named query results in the warning "The collection-valued path 'k.bestellungen' must resolve to an association field.". However, the abstract entity class AbstractKunde has the field (and get/set method) Bestellungen of type List<Bestellung".

@NamedQuery(name  = AbstractKunde.FIND_KUNDEN_OHNE_BESTELLUNGEN,
	    query = "SELECT k"
		    + " FROM   AbstractKunde k"
		    + " WHERE  k.bestellungen IS EMPTY"),
Comment 1 Sergey Petrov 2014-01-15 14:20:39 UTC
thanks, can you provide sample project?
Comment 2 Juergen.Zimmermann 2014-01-15 14:32:38 UTC
Created attachment 143984 [details]
Testcase with named query

In the Maven-ized project (src/main/java) you find the class de.shop.kundenverwaltung.AbstractKunde. The named query is at line 135.
Comment 3 Quality Engineering 2014-01-16 02:43:50 UTC
Integrated into 'main-silver', will be available in build *201401160001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/b37896eaab41
User: Sergey B. Petrov <sj-nb@netbeans.org>
Log: #240497 adjust collection determining
Comment 4 Sergey Petrov 2014-01-16 13:26:10 UTC
integrated