简体   繁体   中英

Symfony2 translatable doesn't use joins

I use translatable and now my page has 133 db queries because symfony retrieves every translation separate. How can I make it do a join when fetching entities?

You should use query hint to do the join before..
https://github.com/l3pp4rd/DoctrineExtensions/blob/master/doc/translatable.md#using-orm-query-hint

However maybe its better not to use translatable sometimes ...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM