Hello, when i try to set parameter to a query like this:
Query query = em
                                .createNativeQuery(
                                                "SELECT id FROM :table WHERE 
(next_run - now() < interval '2
minutes')",
                                                Long.class);
                query.setParameter("table", HARVEST_SCHEDULES_TABLE);

i get this error:

Exception in thread "Thread-1" java.lang.IllegalArgumentException:
no-named-params
        at
org.apache.openjpa.persistence.QueryImpl.setParameter(QueryImpl.java:1066)
        at 
org.apache.openjpa.persistence.QueryImpl.setParameter(QueryImpl.java:79)

what am i doing wrong? thanks a lot

ps: using openjpa 2.0.0
-- 
View this message in context: 
http://openjpa.208410.n2.nabble.com/java-lang-IllegalArgumentException-no-named-params-tp5080072p5080072.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to