simplest criteria query

Posted by c0mrade on Stack Overflow See other posts from Stack Overflow or by c0mrade
Published on 2010-03-29T16:10:29Z Indexed on 2010/03/29 16:13 UTC
Read the original article Hit count: 545

Filed under:
|

What is the simplest hibernate criteria query equivalent of

SELECT name FROM people WHERE id='3'

is it :

criteria.add(Expression.eq("name ", 3));

and how can I retrieve it to String variable the value of name field, the IDs are unique

© Stack Overflow or respective owner

Related posts about hibernate

Related posts about java