I have a model generated with Doctrine named Product that has i18n. Now I need to use the list of products as a dropdown in my form. I use sfWidgetFormDoctrineChoice. This works great: I specify the model name and it does everything for me. It even gets the name of the product based on the current culture.
The problem is that it executes a DB query for every single Product in order to get the name. I know that it can be easily solved with a LEFT JOIN. I tried this query to manually get a list of products: Doctrine_Query::create()->from('Product p')->leftJoin ('p.ProductTranslation pt')->execute() When I look at the model generated with Doctrine (lib/model/doctrine/ base/BaseProduct.php), I see that all relations are defined using $this->hasMany(...), whereas the translation is defined using $this- >actAs($i18n0), leaving me no way to refer to it in my leftJoin. So I have 2 questions: 1. Does sfWidgetFormDoctrineChoice support i18n? 2. If not, how can I select my products + translations with only one query? Thanks, Anna --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---