title: How to force Hibernate use AND in update query?
body: <p>I am trying to update a raw by composite primary key by using hibernate.</p>
  
  <p>Hibernate uses the next style for such updates:</p>
  
  <pre><code>update mytable set mycolumn=321 where (left_pk, right_pk) = (123, 456);
  </code></pre>
  
  <p>Is it possible to force hibernate to use the next style?:</p>
  
  <pre><code>update mytable set mycolumn=321 where left_pk = 123 and right_pk = 456;
  </code></pre>
  
  <p>Both queries work but with a huge difference (at least in MariaDB).<br>
  If we use <code>repeatable read</code> transaction then the first query locks the whole table for updates and the second query locks only the single row for updates.</p>
  
  <p>I would prefer to lock only a single row, so I need to use the second query.</p>