Skip to content

Commit

Permalink
exception message fix
Browse files Browse the repository at this point in the history
  • Loading branch information
qiangxue committed May 10, 2015
1 parent 4488dbb commit 42fd70b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion framework/db/BaseActiveRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,7 @@ public function link($name, $model, $extraColumns = [])

if ($relation->via !== null) {
if ($this->getIsNewRecord() || $model->getIsNewRecord()) {
throw new InvalidCallException('Unable to link models: at most one model can be newly created.');
throw new InvalidCallException('Unable to link models: the models being linked cannot be newly created.');
}
if (is_array($relation->via)) {
/* @var $viaRelation ActiveQuery */
Expand Down

0 comments on commit 42fd70b

Please sign in to comment.