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.
I'm having the following named query which works fine (WildFly 8.0.0.CR1/Hibernate 4.3.0). However, I'm getting the warning "The expression at index 1 is not a valid expression. The expression at index 2 is not a valid Expression.". Index 1 refers to the string "Privatkunde", and index 2 to the sting "Firmenkunde". Both are class names of @Entity classes being derived from the abstract @Entity class AbstractKunde. @NamedQuery(name = AbstractKunde.FIND_PRIVATKUNDEN_FIRMENKUNDEN, query = "SELECT k" + " FROM AbstractKunde k" + " WHERE TYPE(k) IN (Privatkunde, Firmenkunde)")
Created attachment 143985 [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 140.
depends on eclipselink, but may be I'll change general jpql grammar to eclipselink jpql as a workaround
Sergey, I'm using Hibernate - not EclipseLink
validation is done by nb and it means by bundled eclipselink
When you look into the JPA spec chapter 4.6.17.5, then you'll see several examples for so-called "Entity Type Expressions".
There was an EclipseLink bug which was resolved in the past: https://bugs.eclipse.org/bugs/show_bug.cgi?id=249224
next issue is filed https://bugs.eclipse.org/bugs/show_bug.cgi?id=426109
Integrated into 'main-silver', will be available in build *201401210001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/6cb88656aa37 User: Sergey B. Petrov <sj-nb@netbeans.org> Log: #240499 temporary workaround
can be considered as fixed, but need to revert fix if the issue will be fixed in 2.5.2 and it will be bundled
Confirmed: the issue is gone in build 20140123001