Skip to content

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