createQuery() ->addWhere('plan_id = ?', $plan->getId()) ->orderBy('position DESC') ->fetchOne(); } }