Hello,
I'm having troubles with Dali JPQL validation (again).
I asked over at SO here: http://stackoverflow.com/questions/11807738/jpa-jpql-as-identifier-disallowed-in-select-clause
Why is SELECT ... AS ... showing validation errors in Dali?:

Errors at the line 426:
Multiple annotations found at this line:
- The identification variable 'AS' cannot be a reserved word.
- The identification variable 'tipoff' is not defined in the FROM clause.
- The constructor expression has two constructor items ('AS' and 'tipoff') that are not separated by a
comma.
- The constructor expression has two constructor items ('CASE WHEN ga.actualTipoff IS NOT NULL
THEN ga.actualTipoff ELSE ga.scheduledTipoff END' and 'AS') that are not separated by a comma.
- The identification variable 'AS' is not defined in the FROM clause.
The 2nd to last example at http://en.wikibooks.org/wiki/Java_Persistence/JPQL_BNF#New_in_JPA_2.0 shows it should work.
Also note the ORDER BY in the query, which is the main purpose of this aliasing.
What's wrong here (or with Dali)?
Karsten
[Updated on: Sun, 05 August 2012 13:41] by Moderator