-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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.7] Support MorphTo eager loading with selected columns #25662
Conversation
|
It doesn't have to be removed, but the new implementation is much shorter. What would be a case where removing the method breaks existing code? If you override it, calling |
You're right, I was to quick to comment about these changes. Since the same behavior is kept in __call then my initial comment about breaking change was wrong. |
* Support MorphTo eager loading with selected columns (#25662) * version * hyphen-case the Syslog program name Follow existing program name conventions to have more readable logs. * Use Str directly
Hello, #25662 introduce a bug, work :
don't work :
if you have an idea, thanks. |
@lk77 Please open a new issue and provide more details. How is the relationship defined? What does "don't work" mean? |
@staudenmeir the relation is empty.
i would open an issue if i can replicate on fresh laravel install. thanks. edit: issue opened #26291 |
When eager loading
MorphTo
relationships, you can't limit the selected columns (of course, these columns have to be available in all the related tables):As with
withoutGlobalScopes()
(#25331), we can use the$macroBuffer
to fix this. We can also simplify the whole implementation.Fixes #2966.