diff --git a/src/Fufle/ORM/Model.php b/src/Fufle/ORM/Model.php index 69781b7..d7d1ea3 100644 --- a/src/Fufle/ORM/Model.php +++ b/src/Fufle/ORM/Model.php @@ -23,7 +23,12 @@ abstract class Model { } public static function Instance(object $object): static { - return $object; + $obj = new static; + $params = get_object_vars($object); + foreach ($params as $key => $value) { + $obj->{$key} = $value; + } + return $obj; } protected static function QueryModel() {