0
我不能排序我的收藏,我試圖通過一個字段關聯的連接表進行排序..學說2,不能sortby
$query = $this-em->createQueryBuilder()
->select('u')
->from('\Entities\Users', 'u')
->leftJoin('u.comments', 'c')
->orderBy('c.feat', 'ASC')
->addOrderBy('c.position', 'ASC')
->getQuery();
我的註釋爲用戶實體包含本作加入了意見表:
/** @ManyToMany(targetEntity="\Entities\Comments", mappedBy="discoverycategories")*/
protected $comments