title: org.h2.jdbc.JdbcSQLException: Method is only allowed for a query
body: <p>I have used the following code to run a query on my database.</p>
  
  <pre><code>@Repository
  public interface PurchaseOrderRepository extends JpaRepository&lt;PurchaseOrder, PurchaseOrderID&gt; {
  
      @Query(value ="update PURCHASE_ORDER   set status='REJECTED'   where id=?1", nativeQuery = true)
      void RejectPO(Long id);
  }
  </code></pre>
  
  <p>and then i simply call this method in a service</p>
  
  <pre><code>@Service
  public class SalesService {
  
      @Autowired
      PurchaseOrderRepository purchaseOrderRepository;
  public void RejectPurchaseOrder(Long of) {
  
          purchaseOrderRepository.RejectPO(of);
      }
  }
  </code></pre>
  
  <p>but i face with an error:</p>
  
  <pre><code>org.h2.jdbc.JdbcSQLException: Method is only allowed for a query. Use execute or executeUpdate instead of executeQuery; SQL statement:
  update PURCHASE_ORDER   set status='REJECTED'   where id=? [90002-191]
  </code></pre>
  
  <p>The problem is, i have never called <code>executeQuery</code>, i just ask to run it using <code>jpa</code>. So how can i fix it?</p>