> I'm getting a strange Exception when executing the follwing native query 
> to a MySQL db:
>
>            String statement = "UPDATE JBT_Order_Product " +
>                         "SET product_id=100"+
>                             " WHERE EXISTS " +
>                                 "(SELECT o.id FROM JBT_Order o " +
>                                     "WHERE o.scenario=0 " +
>                                     "AND o.id = order_id)";
>            Query query = em.createNativeQuery(statement);
>            query.executeUpdate();
>
> JBT_Order_Product is a Join-Table consisting of the two columns
> product_id -> JBT_Product.id     and
> order_id -> JBT_Order.id
>
> Stacktrace:
>
> <openjpa-1.2.0-r422266:683325 nonfatal general error> 
> org.apache.openjpa.persistence.PersistenceException: PROCEDURE id does 
> not exist

Seb, have you tried to upgrade your JDBC driver? It might be the cause.

Regards,
Milosz



Reply via email to