- Completed merge
This commit is contained in:
1 parent
430cd03bc4
commit
00ebf3381f
10 files changed
+93
-34
No files matched your search
@@ -16,6 +16,8 @@ class Field implements \Ulmus\Annotation\Annotation {
|
||||
|
||||
public bool $nullable;
|
||||
|
||||
public /* mixed */ $default;
|
||||
|
||||
public bool $readonly = false;
|
||||
|
||||
public function __construct(? string $type = null, ? int $length = null)
|
||||
|
||||
@@ -69,6 +69,18 @@ class Relation implements \Ulmus\Annotation\Annotation {
|
||||
return $this->normalizeType() === 'manytomany';
|
||||
}
|
||||
|
||||
public function function() : string
|
||||
{
|
||||
if ($this->function) {
|
||||
return $this->function;
|
||||
}
|
||||
elseif ($this->isOneToOne()) {
|
||||
return 'load';
|
||||
}
|
||||
|
||||
return 'loadAll';
|
||||
}
|
||||
|
||||
public function hasBridge() : bool
|
||||
{
|
||||
return isset($this->bridge);
|
||||
|
||||
Reference in new issue
Block a user