Doctrine_Core::getTable()->findAll() 如何指定顺序?
当使用 Doctrine_Table 对象时,是否可以在使用 findAll() 或 findByWhatever() 时指定返回集合的顺序?
When using a Doctrine_Table object, is it possible to specify the order of the returned collection when using findAll() or findByWhatever()?
在 doc's 我看到了一些关于 getOrderByStatement() 和 processOrderBy() 但不清楚如何使用它们...
In the doc's I see some stuff about getOrderByStatement() and processOrderBy() but it isn't clear on how to use them...
推荐答案
第一个数组也可以留空
$em->getRepository('BackendDestinyBundle:Destiny')->findBy(array(), array('title'=>'asc'));
相关文章