-
Couldn't load subscription status.
- Fork 97
Closed
Description
I believe PR #202 introdudes a bug with the handling of withCasts.
More precisely, on line 100 of file src/JoinsHelper.php, a new model is created
$query->setModel($model = new $originalModel());If $model has anything in its casts property (that was defined with a withCasts), it is not preserved when a new model is passed to setModel().
I'm not sure if it's the right solution, but adding this instruction right after seems to solve my problematic scenario.
$model->mergeCasts($originalModel->getCasts());Metadata
Metadata
Assignees
Labels
No labels