标签: doctrine-orm limit equivalent
Doctrine2中是否有以下SQL代码的等效项?
ORDER BY id DESC LIMIT 0,1
答案 0 :(得分:0)
->setMaxResults(1) ->setFirstResult(0) ->getOneOrNullResult();