Skip to content

Commit

Permalink
Merge branch '3.0' of github.com:top-think/think-orm into 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
liu21st committed Jun 25, 2024
2 parents 9c01d5a + d20e4a9 commit 9226291
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/model/concern/Conversion.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public function appendRelationAttr(string $attr, array $append)
throw new Exception('bind attr has exists:' . $key);
}

$this->data[$key] = $model->$attr;
$this->data[$key] = $model->getAttr($attr);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/model/concern/RelationShip.php
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ public function bindAttr(string $relation, array $attrs = [])
throw new Exception('bind attr has exists:' . $key);
}

$this->set($key, $relation ? $relation->$attr : null);
$this->set($key, $relation ? $relation->getAttr($attr) : null);
}

return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/model/relation/MorphOne.php
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ protected function bindAttr(Model $result, Model $model = null): void
throw new Exception('bind attr has exists:' . $key);
}

$result->setAttr($key, $model?->$attr);
$result->setAttr($key, $model?->getAttr($attr));
}
}
}
2 changes: 1 addition & 1 deletion src/model/relation/OneToOne.php
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ protected function bindAttr(Model $result, Model $model = null): void
throw new Exception('bind attr has exists:' . $key);
}

$result->setAttr($key, $model?->$attr);
$result->setAttr($key, $model?->getAttr($attr));
}
}

Expand Down

0 comments on commit 9226291

Please sign in to comment.