是否可以在 sfDoctrinePager 中使用学说魔法方法(在本例中为 findBy*)?我收到以下错误:
Call to undefined method Doctrine_Collection::offset()
这是代码:
$this->pager->setQuery(Doctrine::getTable('notification')->findByUserId($this->getUser()->getGuardUser()->getId()));
我知道我可以自己构建一个查询,只是想知道是否可以使用“魔术”方法。