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.8] Set connection name on cursor() results #28804

Merged
merged 1 commit into from
Jun 11, 2019
Merged

[5.8] Set connection name on cursor() results #28804

merged 1 commit into from
Jun 11, 2019

Conversation

staudenmeir
Copy link
Contributor

When a model uses the default connection, cursor() doesn't set the connection name.

User::first()->getConnectionName(); // 'mysql'
User::cursor()->current()->getConnectionName(); // null

Fixes #28794.

@taylorotwell taylorotwell merged commit 1ca32c0 into laravel:5.8 Jun 11, 2019
@staudenmeir staudenmeir deleted the cursor branch June 11, 2019 20:59
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.

lluminate\Database\Eloquent\Builder::cursor() create models with wrong (null) connection
2 participants