lexik / LexikTranslationBundle

This Symfony bundle allow to import translation files content into the database and provide a GUI to edit translations.
MIT License
425 stars 262 forks source link

Update TransUnitRepository.php #410

Closed FolkenFR closed 1 year ago

FolkenFR commented 2 years ago

I use this bundle with an Oracle database and the "in" condition is limited to 1000. So I need to limit the number of ids used with the "in" condition. By the way, limit the number of id isn't a bad choice.

bartmcleod commented 2 years ago

@FolkenFR I remember a recent case where I needed an IN condition on an unrelated project, with over 5,000 id's. I worked fine and it saved the day. Is it really a good idea, to limit the IN condition for everyone?

bartmcleod commented 2 years ago

From your PR, I also do not see immediately how this code is going to limit $locales to 1000 elements...

FolkenFR commented 2 years ago

Applying the domain filter in the query greatly limits the number of identifiers returned by the query on line 225. In my case, the number of ids returned is less than 1000 when a user lists the translations by domain.

bartmcleod commented 1 year ago

@FolkenFR I checked out your PR, but tests fail when I do. You probably need to rebase on master

bartmcleod commented 1 year ago

Closing because I am not convinced it is a good idea to limit an IN clause to 1000 elements. If anyone thinks this should be re-opened, let me know or if you can, just re-open it with a comment stating why it would be good idea.