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

Reply via email to