Factory.php was not taking into account fields that have {$class}_id as their primary key instead of id eg user_id as the primary key for the users table. - fixed and tests still pass.
All existing test passing but sorry - I'm only half way into "Laravel Testing Decoded" so not confident enough to write additional test as I get to the
if (static::$isSaving and pregmatch('/([A-z]+)[-]id$/i', $field, $matches))
line (c. 330) and I'm not sure you want to set the $isSaving to true & start saving to a db.
Factory.php was not taking into account fields that have
{$class}_id
as their primary key instead ofid
eguser_id
as the primary key for theusers
table. - fixed and tests still pass.All existing test passing but sorry - I'm only half way into "Laravel Testing Decoded" so not confident enough to write additional test as I get to the if (static::$isSaving and pregmatch('/([A-z]+)[-]id$/i', $field, $matches)) line (c. 330) and I'm not sure you want to set the $isSaving to true & start saving to a db.