title: Could hibernate be causing this 'fetch out of sequence' error?
body: <p>I am attempting to execute this query (in an Oracle DB) with Hibernate/Spring JPA:</p>
  
  <pre><code>@Query( value = "DELETE from MY_TABLE where ID = :ID", nativeQuery = true)
      void delete(Long ID);
  </code></pre>
  
  <p>There is a BEFORE DELETE trigger on the table that is making up for poor table design that I <strong>cannot</strong> change, it runs around deleting rows from dependent tables so that the base DELETE doesn't cause any foreign key errors. I am fairly sure this shouldn't be an issue, but if it is let me know.</p>
  
  <p>Now then, on execution this query causes a <code>ORA-01002: fetch out of sequence</code> error which, according to google, is caused when <code>a fetch has been attempted from a cursor which is no longer valid</code>. (To be completely clear, I have not initiated any cursors with my query or my trigger) </p>
  
  <p><strong>BUT</strong>, the row and all its dependants <em>are</em> <strong>actually being deleted successfully</strong>. Because of this I am not sure what is causing the error and would like yalls' help</p>