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

Change relation() to use the new ofMany #297

Merged
merged 1 commit into from
Oct 10, 2022
Merged

Change relation() to use the new ofMany #297

merged 1 commit into from
Oct 10, 2022

Conversation

quintenbuis
Copy link
Contributor

This PR changes the translation() relation to the new ofMany method and fixes #275

Copy link
Member

@Gummibeer Gummibeer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 🎉
Looking good. :)

@Gummibeer
Copy link
Member

@Lambutty
Copy link

Lambutty commented Jun 18, 2024

This change produces awfull performance for me.
Project Laravel 11 . Maria DB 11.
Execution time went from under 1 second to over 30 seconds.
When calling Article::with(['translation','a lot more relationships here']); .
This issues is only present in Maria DB 11.x. Every older version doesnt seem to be affected.
I dont know why and it already cost a lot of debugging time to find the source of the problem.
Anyways have a nice one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

refactor translation() to hasOne()->ofMany() relationship
4 participants