loadQuery(DeliveryNoteRepositoryQuery::class); } public function getDefaultOptionsSearch(): array { return [ self::WITH => [], self::JOIN_WITH => ['user AS user_delivery_note', 'producer'], self::ORDER_BY => 'date ASC', self::ATTRIBUTE_ID_PRODUCER => 'delivery_note.id_producer' ]; } public function findOneDeliveryNoteById(int $id): ?DeliveryNote { return $this->createDefaultQuery() ->filterById($id) ->findOne(); } }