| IN clause in @NamedNativeQuery [message #646278] |
Wed, 22 December 2010 23:29  |
Sarkan Messages: 10 Registered: May 2010 |
Junior Member |
|
|
Dear All,
I want to use @NamedNativeQuery for one of my query which is quite complex to write as @NamedQuery and it contains IN clause where we need to specify parameters dynamically.
When i wrote query in my code like:
SELECT [COLUMNS] FROM TABLE WHERE COLUMN IN ('A','B','C')
it works perfectly, but when i try to put this query inside my entity object as:
@NamedNativeQuery (name="XXX",query="SELECT [COLUMNS] FROM TABLE WHERE COLUMN IN ?1")
it doesn't work.
I have used IN clause as mentioned above in JPQLs using @NamedQuery and it works fine but when it comes to @NamedNativeQuery it stops working.
So i assume eclipselink doesn't support parameterized "IN clause" in case of @NamedNativeQuery. Is it TRUE?
|
|
|