PostRepository#getPostWithComments() fixed.
This commit is contained in:
parent
6d10b6dac1
commit
f4f33a8947
|
@ -16,6 +16,7 @@ class PostRepository extends EntityRepository
|
||||||
->leftJoin('p.comments', 'c')
|
->leftJoin('p.comments', 'c')
|
||||||
->leftJoin('c.author', 'a')
|
->leftJoin('c.author', 'a')
|
||||||
->where($qb->expr()->eq('p.id', ':post_id'))
|
->where($qb->expr()->eq('p.id', ':post_id'))
|
||||||
|
->orderBy('c.number', 'asc')
|
||||||
->setParameter('post_id', $postId)
|
->setParameter('post_id', $postId)
|
||||||
->getQuery()->getOneOrNullResult()
|
->getQuery()->getOneOrNullResult()
|
||||||
;
|
;
|
||||||
|
|
Loading…
Reference in a new issue