diff --git a/src/Granada/Granada.php b/src/Granada/Granada.php index 136c28a..6c0b5fb 100644 --- a/src/Granada/Granada.php +++ b/src/Granada/Granada.php @@ -430,8 +430,8 @@ public function set($property, $value = null) { $property[$field] = $this->$method($val); $value = null; } - elseif(!is_array($property) && method_exists($this, $property)){ - $this->relationships[$property] = $value; + elseif(method_exists($this, $field)){ + $this->relationships[$field] = $val; } } $result = $this->orm->set($property, $value);