Astrotomic / laravel-translatable

A Laravel package for multilingual models
https://docs.astrotomic.info/laravel-translatable/
MIT License
1.23k stars 155 forks source link

Change relation() to use the new ofMany #297

Closed quintenbuis closed 1 year ago

quintenbuis commented 1 year ago

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

Gummibeer commented 1 year ago

https://github.com/Astrotomic/laravel-translatable/releases/tag/v11.11.0

Lambutty commented 2 months ago

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.