- WIP on Notes v2.x

This commit is contained in:
mcndave committed 2024-05-09 19:49:27 +00:00
1 parent 1dd9da6eb6
commit 75231f32b3
7 files changed
+104 -156

No files matched your search

+2 -2
View File
@@ -219,7 +219,7 @@ class RelationBuilder
$entity = $this->relationAnnotations($name, $annotation)['relationRelation']->entity;
}
else {
$entity = $annotation->entity ?? $this->resolver->properties[$name]['type'];
$entity = $annotation->entity ?? $this->resolver->reflectedClass->getProperties()[$name]->getTypes()[0]->type;
}
$name = strtolower($name);
@@ -266,7 +266,7 @@ class RelationBuilder
public function oneToMany(string $name, Relation|Attribute\Property\Relation $relation) : Repository
{
$baseEntity = $relation->entity ?? $this->resolver->properties[$name]['type'];
$baseEntity = $relation->entity ?? $this->resolver->reflectedClass->getProperties()[$name]->getTypes()[0]->type;
$this->repository = $baseEntity::repository();