core icon indicating copy to clipboard operation
core copied to clipboard

Use correct parent model for `hasOne` relationships

Open JSn1nj4 opened this issue 1 year ago • 0 comments

When eager-loading hasOne relationships on a collection of parent models, it always uses the last parent assigned to $model further up in the method call.

This is fixed by using $value inside the loop where the relationship is loaded.

JSn1nj4 avatar Jul 30 '24 15:07 JSn1nj4