title: Hibernate detached queries as a part of the criteria query
body: <p>java experts can you please help me write detached queries as a part of the criteria query for the following SQL statement.</p>
  
  <pre><code>select A.*
  FROM AETABLE A
  where not exists
  (
      select entryid
      FROM AETABLE B
      where B.classpk = A.classpk
      and B.userid = A.userid
      and B.modifiedDate &gt; A.modifiedDate
  )
  and userid = 10146
  </code></pre>