openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Wisneski (JIRA)" <j...@apache.org>
Subject [jira] Closed: (OPENJPA-55) Allow executeUpdate() invocations on native queries
Date Thu, 01 Feb 2007 01:46:05 GMT

     [ 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.


Mime
View raw message