hibernate SELECT..WHERE.. IN (value1, val2...)
when using createCriteria, how to specify SELECT.开发者_开发知识库.WHERE.. IN (value1, val2...) ?
See Restrictions.in:
List cats = sess.createCriteria(Cat.class)
.add( Restrictions.in( "name", new String[] { "Fritz", "Izi", "Pk" } ) )
You could use Restrictions.in method.
精彩评论