From 1b1c6f510673ec39c581a3370427adc369aaca6d Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Tue, 10 Aug 2021 20:04:34 +0200 Subject: Exclude "_modified" property from "getAll" method The "getAll" method of the Entity class should return an array with real attributes of the Entity object but not internally used properties. --- core/namespace/ORM/Entity.php | 1 + 1 file changed, 1 insertion(+) diff --git a/core/namespace/ORM/Entity.php b/core/namespace/ORM/Entity.php index 592aeb5..61b9371 100644 --- a/core/namespace/ORM/Entity.php +++ b/core/namespace/ORM/Entity.php @@ -39,6 +39,7 @@ abstract class Entity implements EntityInterface { #=============================================================================== public function getAll(array $exclude = []): array { $attributes = get_object_vars($this); + $exclude = array_merge($exclude, ['_modified']); return array_filter($attributes, function($attribute) use($exclude) { return !in_array($attribute, $exclude); -- cgit v1.2.3