- Some small bugfixes done
This commit is contained in:
1 parent
fa8adcace1
commit
58bdce0ea8
5 files changed
+28
-9
No files matched your search
+13
-4
@@ -22,16 +22,18 @@ class Repository
|
||||
|
||||
public ? ConnectionAdapter $adapter;
|
||||
|
||||
protected Query\QueryBuilderInterface $queryBuilder;
|
||||
|
||||
protected EntityResolver $entityResolver;
|
||||
|
||||
public string $alias;
|
||||
|
||||
public string $entityClass;
|
||||
|
||||
public array $events = [];
|
||||
|
||||
protected Query\QueryBuilderInterface $queryBuilder;
|
||||
|
||||
protected EntityResolver $entityResolver;
|
||||
|
||||
protected array $joined = [];
|
||||
|
||||
public function __construct(string $entity, string $alias = self::DEFAULT_ALIAS, ConnectionAdapter $adapter = null) {
|
||||
$this->entityClass = $entity;
|
||||
$this->alias = $alias;
|
||||
@@ -592,6 +594,13 @@ class Repository
|
||||
|
||||
# @TODO Apply FILTER annotation to this too !
|
||||
foreach(array_filter((array) $fields) as $item) {
|
||||
if ( isset($this->joined[$item]) ) {
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
$this->joined[$item] = true;
|
||||
}
|
||||
|
||||
$annotation = $this->entityResolver->searchFieldAnnotation($item, [ Attribute\Property\Join::class, Join::class ]) ?:
|
||||
$this->entityResolver->searchFieldAnnotation($item, [ Attribute\Property\Relation::class, Relation::class ]);
|
||||
|
||||
|
||||
Reference in new issue
Block a user