- Added a new EntityCollection factory
This commit is contained in:
1 parent
8e521025d3
commit
538af38769
2 files changed
+10
-2
No files matched your search
+9
-1
@@ -332,7 +332,7 @@ trait EntityTrait {
|
||||
public function isLoaded() : bool
|
||||
{
|
||||
if ( null === $pkField = $this->resolveEntity()->getPrimaryKeyField($this) ) {
|
||||
throw new Exception\EntityPrimaryKeyUnknown("Entity has no field containing attributes 'primary_key'");
|
||||
throw new Exception\EntityPrimaryKeyUnknown(sprintf("Entity %s has no field containing attributes 'primary_key'", static::class));
|
||||
}
|
||||
|
||||
$key = key($pkField);
|
||||
@@ -372,6 +372,14 @@ trait EntityTrait {
|
||||
return Ulmus::repository(static::class, $alias);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Ignore
|
||||
*/
|
||||
public static function entityCollection(...$arguments) : EntityCollection
|
||||
{
|
||||
return new EntityCollection(...$arguments);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Ignore
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user