[symfony-users] Re: sfValidatorDoctrineChoice and i18n

2010-03-25 Thread Tom Ptacnik
At first I want to say that I'm only guessing what might be wrong, because I'm not much experienced Symfony user...so If someone else know whats wrong, just write it ;) I would try to simplier the code of the widget... 'category'= new sfWidgetFormDoctrineChoice(array('model' = 'Category',

[symfony-users] Re: sfValidatorDoctrineChoice and i18n

2010-03-24 Thread HiDDeN
Like this: $query_categories = Doctrine_Core::getTable('Category')- createQuery('c')-select('c.id, t.name name, t.slug slug')- leftJoin('c.Translation t')-andWhere('t.lang = ?', 'en'); 'category'= new sfWidgetFormDoctrineChoice(array('model' = 'Category', 'method' = 'getName', 'key_method' =

[symfony-users] Re: sfValidatorDoctrineChoice and i18n

2010-03-22 Thread Tom Ptacnik
Have the model Category a slug attribute?, or better, has it a getSlug() method? On 22 bře, 12:19, HiDDeN davidmoralesmoj...@gmail.com wrote: I'm using Symfony 1.4.3 + Doctrine 1.2, and a typical i18n category table (the ids are in category, and the name and slug in category_translation). I

[symfony-users] Re: sfValidatorDoctrineChoice and i18n

2010-03-22 Thread HiDDeN
Yes, it is defined as a i18n table: Category: actAs: I18n: fields: [name] actAs: Sluggable: { fields: [name], uniqueBy: [lang, name] } columns: id: { type: integer(2), unsigned: true, primary: true } name: { type: string, length: 50, notnull: true } On