2
我正在使用Symfony 1.4和Doctrine。我有一個名爲Image的教義類和一個(應該)通過查詢找到下一個和前一個值的方法。有問題的代碼如下所示:「找不到類」主體子查詢
$q = Doctrine_Core::getTable('Image')->createQuery()
->from('Image i')
->where('i.id = (select max(a.id) from Image a where ? > a.id and is_active = 1)', $this->getId())
->orWhere('i.id = (select min(b.id) from Image b where ? < b.id and is_active = 1)', $this->getId());
我總是得到
500 |內部服務器錯誤| Doctrine_Exception找不到類a
錯誤。任何提示?