active-record
active-record copied to clipboard
AR::refresh() takes default condition into account
Not sure if it should be like this but if find() is overridden with a default condition, this will affect refresh() so that it will return false even if the row exists, but just does not match the condition anymore. I would expect refresh() to refresh the record regardless of any default condition.
Hm... I also can not reset loaded relations when the record is not found in DB. https://github.com/yiisoft/yii2/blob/master/framework/db/BaseActiveRecord.php#L947