@@ -54,7 +54,7 @@ abstract class AbstractRepositoryQuery | |||
; | |||
} | |||
public function find() | |||
public function find() :array | |||
{ | |||
return $this->query->getQuery()->getResult(); | |||
} | |||
@@ -90,5 +90,13 @@ abstract class AbstractRepositoryQuery | |||
return $data; | |||
} | |||
public function orderBy($field, $sort){ | |||
if(substr($field,0,1)=== '.'){ | |||
return $this->addOrderBy($field, $sort) ; | |||
}else{ | |||
return $this->addOrderBy('.'.$field, $sort) ; | |||
} | |||
} | |||
} | |||