Skip to content

Commit

Permalink
Fix setter for relationships
Browse files Browse the repository at this point in the history
  • Loading branch information
Surt committed Nov 8, 2013
1 parent 06fce5f commit 73a3388
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Granada/Granada.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 73a3388

Please # to comment.