Silverstripe:DataList过滤器等效于'Value> x OR Value = y'

Fra*_*ser 4 silverstripe

我知道我可以通过以下方式为我的过滤器指定多个值:

xxx::get()->filter('FirstName', array('Sam', 'Sig'));
Run Code Online (Sandbox Code Playgroud)

这给了我相当于:

... WHERE FirstName = 'Sam' OR FirstName = 'Sig'
Run Code Online (Sandbox Code Playgroud)

然而,似乎没有任何方法将OR's与修饰符组合('LastVisited:GreaterThan' => '2011-01-01')

我需要能够像这样过滤:

WHERE ExpiryDate > 29-11-2012 OR ExpiryDate IS NULL
Run Code Online (Sandbox Code Playgroud)

我想要达到的目标是什么?我已经阅读了文档,但没有找到我的问题的答案.

谢谢

3dg*_*goo 6

where()如果没有别的东西可以满足你的需要,你总是可以使用这个功能.

xxx::get()->where("\"ExpiryDate\" > 29-11-2012 OR \"ExpiryDate\" IS NULL");
Run Code Online (Sandbox Code Playgroud)

http://doc.silverstripe.org/framework/en/topics/datamodel#where-clauses