
|
If you were logged in you would be able to see more operations.
|
|
|
| Resolution Date: |
01/Mar/07 02:20 AM
|
|
Currently, native queries only allow you to execute via getResultList or getSingleResult. Also allow execution through executeUpdate(). Original report:
I have a customer who is using Kodo 4.0.1 JPA and tried to use the following line to lock back end tables:
> String sql = "LOCK TABLE ...... IN EXCLUSIVE MODE";
> Query q = em.createNativeQuery(sql);
> q.executeUpdate();
But he got errors:
Caused by: <4|false|4.0.1> kodo.persistence.InvalidStateException: Cannot perform an update or delete operation on select query: "LOCK TABLE .... IN EXCLUSIVE MODE".
at kodo.persistence.QueryImpl.executeUpdate(QueryImpl.java:355)
|
|
Description
|
Currently, native queries only allow you to execute via getResultList or getSingleResult. Also allow execution through executeUpdate(). Original report:
I have a customer who is using Kodo 4.0.1 JPA and tried to use the following line to lock back end tables:
> String sql = "LOCK TABLE ...... IN EXCLUSIVE MODE";
> Query q = em.createNativeQuery(sql);
> q.executeUpdate();
But he got errors:
Caused by: <4|false|4.0.1> kodo.persistence.InvalidStateException: Cannot perform an update or delete operation on select query: "LOCK TABLE .... IN EXCLUSIVE MODE".
at kodo.persistence.QueryImpl.executeUpdate(QueryImpl.java:355) |
Show » |
|