[CORE][Entity] Compare with object properties when creating/updating, instead of class
This commit is contained in:
parent
75f70f8182
commit
4ecdeac6a3
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user