yii2 关系...
link($name)
会使用..get$name...即有hasmany和hasone...
// update lazily loaded related objects
if (!$relation->multiple) {
$this->_related[$name] = $model;
} elseif (isset($this->_related[$name])) {
if ($relation->indexBy !== null) {
$indexBy = $relation->indexBy;
$this->_related[$name][$model->$indexBy] = $model;
} else {
$this->_related[$name][] = $model;
}
}
如果是单独模型的画则直接赋值