Skip to content

Conversation

@GrandadEvans
Copy link

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 preg_match('/([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 of `id` eg `user_id` as the primary key for the `users` table. - fixed and tests still pass
Put my info in the composer.json so that I can submit the package to packagist and pull it in with the fixed file instead of my changes being undone when composer updates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant