Enum literals in JPQL IN expressions [message #540481] |
Wed, 16 June 2010 06:52  |
Eclipse User |
|
|
|
Hi,
I am trying to use Enum literals in JPQL IN expressions to select all Phones with a specific PhoneType where PhoneType is a Java Enum. The JPQL query is:
SELECT p FROM Phone p WHERE p.type IN (my.package.PhoneType.Home, my.package.PhoneType.Work)
This results in a Syntax error while parsing the query.
Exception Description: Syntax error parsing the query [nonMobilePhones: SELECT p FROM Phone p WHERE p.type IN (my.package.PhoneType.Home, my.package.PhoneType.Work)], line 1, column 41: syntax error at [.].
Can anyone give me a hint how this query has to be formulated with correct syntax?
Thanks,
Thomas
|
|
|
|
|
|
Re: Enum literals in JPQL IN expressions [message #542541 is a reply to message #540888] |
Fri, 25 June 2010 05:27  |
Eclipse User |
|
|
|
Hi James,
sorry for the late reply.
We are currently using EclipseLink 2.0.2.
I've tested the scenario with EclipseLink 2.1. Seems that the problem has been fixed in that version. Everything works fine with EclipseLink 2.1.
Thanks for the hint.
Regards,
Thomas
|
|
|
Powered by
FUDForum. Page generated in 0.06562 seconds