- Work done on search request mostly

This commit is contained in:
Dave Mc Nicoll committed 2026-05-21 15:19:35 +00:00
1 parent f938e18572
commit 7b35de3258
7 files changed
+26 -14

No files matched your search

+4 -2
View File
@@ -95,7 +95,7 @@ class EntityResolver {
return $fieldList;
}
public function relation(string $name) : array
public function relation(string $name, bool $throwOnError = true) : ? array
{
$property = $this->reflectedClass->getProperties(true)[$name] ?? false;
@@ -111,8 +111,10 @@ class EntityResolver {
return [];
}
catch(\Throwable $e) {
throw new \InvalidArgumentException("Can't find entity relation's column named `$name` from entity {$this->entityClass}");
$throwOnError && throw new \InvalidArgumentException("Can't find entity relation's column named `$name` from entity {$this->entityClass}");
}
return null;
}
public function getPropertyHavingAttribute(array|object|string $type) : array