loadQuery(RotatingProductRepositoryQuery::class); } public function getDefaultOptionsSearch(): array { return [ self::WITH => [], self::JOIN_WITH => [], self::ORDER_BY => 'rotating_product.position ASC', self::ATTRIBUTE_ID_PRODUCER => '' ]; } public function findOneLastRotatingProduct(Rotating $rotating): ?RotatingProduct { return $this->createQuery() ->filterByRotating($rotating) ->orderBy('rotating_product.position DESC') ->findOne(); } }