Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » IN clause in @NamedNativeQuery (IN clause not working when used in @NamedNativeQuery)
IN clause in @NamedNativeQuery [message #646278] Wed, 22 December 2010 23:29 Go to previous message
Sarkan is currently offline 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?
 
Read Message
Read Message
Read Message
Read Message
Previous Topic:quoted identifiers
Next Topic:Named Query error
Goto Forum:
  


Current Time: Sun May 19 05:01:01 EDT 2013

Powered by FUDForum. Page generated in 0.01613 seconds