You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Abe White (JIRA)" <ji...@apache.org> on 2006/09/19 20:26:24 UTC
[jira] Created: (OPENJPA-55) Allow executeUpdate() invocations on
native queries
Allow executeUpdate() invocations on native queries
---------------------------------------------------
Key: OPENJPA-55
URL: http://issues.apache.org/jira/browse/OPENJPA-55
Project: OpenJPA
Issue Type: Improvement
Components: query
Reporter: Abe White
Priority: Minor
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)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Closed: (OPENJPA-55) Allow executeUpdate() invocations on
native queries
Posted by "David Wisneski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-55?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Wisneski closed OPENJPA-55.
---------------------------------
Resolution: Fixed
fixed by revision 497605
> Allow executeUpdate() invocations on native queries
> ---------------------------------------------------
>
> Key: OPENJPA-55
> URL: https://issues.apache.org/jira/browse/OPENJPA-55
> Project: OpenJPA
> Issue Type: Improvement
> Components: query
> Reporter: Abe White
> Assigned To: David Wisneski
> Priority: Minor
>
> 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)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (OPENJPA-55) Allow executeUpdate() invocations on
native queries
Posted by "David Wisneski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-55?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Wisneski reassigned OPENJPA-55:
-------------------------------------
Assignee: David Wisneski
we think we fixed this. We wil retest.
> Allow executeUpdate() invocations on native queries
> ---------------------------------------------------
>
> Key: OPENJPA-55
> URL: https://issues.apache.org/jira/browse/OPENJPA-55
> Project: OpenJPA
> Issue Type: Improvement
> Components: query
> Reporter: Abe White
> Assigned To: David Wisneski
> Priority: Minor
>
> 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)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.