Grails criteria query checking `OR` logic

后端 未结 1 1899
广开言路
广开言路 2021-01-23 20:59

I having grails criteriaQuery where I am checking OR logic againist a single state variable like this:

or {
     eq(\"status\", Status.         


        
相关标签:
1条回答
  • 2021-01-23 21:15

    You can use

    'in'( "status", [Status.ONE, Status.TWO, Status.THREE] ) 
    

    Or just

    'in'( "status", Status.values() ) 
    

    if Status is an enum with values ONE, TWO & THREE.

    0 讨论(0)
提交回复
热议问题