[CORE][Entity] Compare with object properties when creating/updating, instead of class

This commit is contained in:
Diogo Peralta Cordeiro 2021-08-11 23:46:02 +01:00
parent aec8521e4b
commit c0a404c640
Signed by: diogo
GPG Key ID: 18D2D35001FBFAB0
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ abstract class Entity implements \JsonSerializable
}
foreach ($args as $prop => $val) {
if (property_exists($class, $prop)) {
if (property_exists($obj, $prop)) {
$set = 'set' . ucfirst(Formatting::snakeCaseToCamelCase($prop));
$obj->{$set}($val);
} else {