0

私はこの基準を持っています:

def myList =  BAS.createCriteria().list () {
  projections { distinct ( "id" ) 
      property("date")
      property("id")
  }

  carList{ 
      eq("login",login)    
          }

  ccList{
      eq("cmd",false)
        }


  order("date","desc")
}

「cmd」の条件としてnullも追加したいです。私の場合に使用する OR はありますか?

ありがとう

4

1 に答える 1

4

Yes, there is an OR that you can use in this case.

ccList {
  or {
    eq("cmd", false)
    isNull("cmd")
  }
}

The documentation has this and other options outlined. Further information is also found throughout the rest of the documentation.

于 2014-01-16T11:23:11.907 に答える