title: Hibernate: lockMode for criteria is not working
body: <p>I need to specify lock mode for hibernate.
  What I am doing:</p>
  
  <pre><code>session().createCriteria(clazz, "c")
    .add(Restrictions.eq("c.a", false))
    .add(Subqueries.propertyEq("c.b", subquery))
    .setLockMode("pos", LockMode.PESSIMISTIC_READ);
  </code></pre>
  
  <p>But when I see provided query - hibernate still doesn't provide <code>SELECT FOR UPDATE</code></p>
  
  <p>How can I force hibernate to make <code>SELECT FOR UPDATE</code> clause?
  I see only case when it works is this:</p>
  
  <pre><code>session().get(clazz, id, LockOptions.UPGRADE);
  </code></pre>
  
  <p>But I need to use more complex query.</p>