开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜