You can iterate over a dataset and save as many as records you want if you trying to save multiple comments for one user and one more thing you should assign the id not the object itself
$user = User::model()->findByPk(1);
$comment = new comment();
$comment ->content= 'This is ant awesome topic¹';
$comment->user = $user->id;
$comment->save();
It’s what I’ve figured out, but I’m used to assign object value to object, instead relating them by using ids (when working with other implementations of active record pattern). So this post was to check if i’m doing something wrong, or it’s not possible.
Thank you! I appreciate time it took you to respond