Hi,

How are you executing the query? I'm guessing that you're using
Query.getResultList() or Query.getSingleResult() instead of
Query.executeUpdate().

-Patrick

-- 
Patrick Linskey
BEA Systems, Inc. 

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it. 

> -----Original Message-----
> From: George Hongell [mailto:[EMAIL PROTECTED] 
> Sent: Monday, December 04, 2006 10:12 AM
> To: open-jpa-dev@incubator.apache.org
> Cc: David Wisneski; Ahmad Nouri
> Subject: openjpa NativeQuery and NamedNativeQuery only allow 
> select sql statements
> 
> It seems that openjpa NativeQuery and NamedNativeQuery only 
> allow "select" 
> sql statements.  When I try to
> insert, delete, update, create table, alter table, drop 
> table, or call a 
> stored procedure, I get 
> <4|false|0.9.6-incubating-SNAPSHOT> 
> org.apache.openjpa.persistence.InvalidStateException: Cannot 
> perform an 
> update or delete operation on select query: "call out2(?, ?)".
> Is this intentional? 
> I expected the NativeQuery to allow me to execute any valid 
> sql statement.
> 

Reply via email to