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

[5.3] Fix morphTo naming inconsistency #15334

Merged
merged 1 commit into from
Sep 8, 2016
Merged

[5.3] Fix morphTo naming inconsistency #15334

merged 1 commit into from
Sep 8, 2016

Conversation

themsaid
Copy link
Member

@themsaid themsaid commented Sep 8, 2016

As reported here: #10501

Currently the relationship name is converted to snake_case, which is inconsistent with other relationship types naming.

@joshbodine21
Copy link

This modification seems to have caused an issue with the possibility of custom naming of morphTo relationships. For example, before this change, in my code I was able to use $table->morphs('Affiliation') and it would create my DB columns as expected (Affiliation_id and Affiliation_type). This change now causes the code to look for affiliation_type and _id which doesn't match my case. I realize that may not be to convention, but previously I was able to pass my parameters to the morphTo relationship and my naming was honored. Now, it forces the snake_case and my morphTo relationship returns null.

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.

3 participants