populateModel usage with eager loading related records
Would like to know if this is the best solution? Upvote if you think it is.

The solution is make your own custom populateModel method to catch the eager loaded attributes

/**
 * @param array|Market_VariantRecord $values
 *
 * @return $this
 */
public static function populateModel($values)
{
    $model = parent::populateModel($values);
    if (is_object($values) &amp;&amp; $values instanceof Market_ProductRecord) {
        $model-&gt;product = $values-&gt;product;
    }

    return $model;
}


I suppose the Craft core BaseModel could check if the value of type BaseRecord and do the same?