Skip to content

Commit

Permalink
Fix issue with model relations being lost after refresh in getExample…
Browse files Browse the repository at this point in the history
…ModelFromFactoryCreate (#901)

Co-authored-by: Cédric Dijoux <cedric.dijoux.ext@koesio.com>
  • Loading branch information
PrinceChoco and Cédric Dijoux authored Oct 18, 2024
1 parent 4d4a44e commit 3aa44f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Extracting/InstantiatesExampleModels.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ protected function instantiateExampleModel(
protected function getExampleModelFromFactoryCreate(string $type, array $factoryStates = [], array $relations = [])
{
$factory = Utils::getModelFactory($type, $factoryStates, $relations);
return $factory->create()->load($relations)->refresh();
return $factory->create()->refresh()->load($relations);
}

/**
Expand Down

0 comments on commit 3aa44f8

Please sign in to comment.