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

[6.x] Support mass assignment to SQL Server views #37307

Merged
merged 1 commit into from
May 7, 2021

Conversation

madbarron
Copy link
Contributor

SqlServerGrammar assumes that the model is backed by a table, but some unfortunate souls attach to views in SQL Server. Since we now check mass assignment keys against the database columns, we need to be able to fetch the columns for views.

SQL Server will not allow a table and a view to have the same name in the same namespace, so this should not introduce any problems with matching multiple items.

Commit which introduced the problem: 70d261d

SqlServerGrammar assumes that the model is backed by a table, but some unfortunate souls attach to views in SQL Server. This revision updates SqlServerGrammar to look for views as well as tables.
@madbarron madbarron changed the title Support mass assignment to SQL Server views [6.x] Support mass assignment to SQL Server views May 7, 2021
@taylorotwell taylorotwell merged commit 82bc4f8 into laravel:6.x May 7, 2021
@taylorotwell
Copy link
Member

@madbarron you need to make the same changes to 8.x branch, which uses different queries to determine if a table exists and to list columns. Please send a PR for that.

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.

None yet

2 participants