Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix explanation of automatic foreign key detection in 'One to many' relationship block #4386

Merged
merged 1 commit into from
Jul 20, 2018

Conversation

introwit
Copy link
Contributor

  • If the owning model uses a primary key other than id, let's say the Post model from the given example uses uuid as the primary key, then the current explanation will result in an error.
  • The current explanation says it will prefix it with _id (hardcoded) i.e. doing $post->comments will look for post_id in comments table, but instead it will look for post_uuid.

@taylorotwell taylorotwell merged commit ba31b1c into laravel:5.6 Jul 20, 2018
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.

2 participants