-
Description:The following seeder should create only 10 family rows as the factory count is 10
Steps To Reproduce: |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
Please paste your full model, test and factories. Thanks |
Beta Was this translation helpful? Give feedback.
-
The following syntax solve the problem
Instead of
|
Beta Was this translation helpful? Give feedback.
-
Thank you @hsmfawaz I realized that if the Factory of the relation model has two model factories inside, this could lead on creation of multiple records on the base model. For example:
This should give as 1 user record and 10 section records. But have in mind the Section factory. If the Section factory has inside the definition the Post::factory, then this could lead to problems.
This can lead to having created 11 user records and 10 section records. |
Beta Was this translation helpful? Give feedback.
The following syntax solve the problem
Instead of