aboutsummaryrefslogtreecommitdiffstats
path: root/core/namespace/ORM/Repositories
diff options
context:
space:
mode:
Diffstat (limited to 'core/namespace/ORM/Repositories')
-rw-r--r--core/namespace/ORM/Repositories/Category.php14
1 files changed, 2 insertions, 12 deletions
diff --git a/core/namespace/ORM/Repositories/Category.php b/core/namespace/ORM/Repositories/Category.php
index ead54a4..c00fdf3 100644
--- a/core/namespace/ORM/Repositories/Category.php
+++ b/core/namespace/ORM/Repositories/Category.php
@@ -32,12 +32,7 @@ class Category extends Repository {
$Statement->execute([$value]);
# TODO: Virtual column _depth shall not be fetched into the entity class
- if($entities = $Statement->fetchAll($this->Database::FETCH_CLASS, static::getClassName())) {
- $this->storeMultipleInstances($entities);
- return $entities;
- }
-
- return [];
+ return $this->fetchEntities($Statement);
}
#===============================================================================
@@ -61,12 +56,7 @@ class Category extends Repository {
$Statement = $this->Database->prepare($query);
$Statement->execute();
- if($entities = $Statement->fetchAll($this->Database::FETCH_CLASS, static::getClassName())) {
- $this->storeMultipleInstances($entities);
- return $entities;
- }
-
- return [];
+ return $this->fetchEntities($Statement);
}
#===============================================================================