Re: Question about I18n and relation
> $this->Category->recursive = -1: > $category = $this->Category->read(null, $id) > $items = $this->Category->Item->find('all', array('conditions' => > array('category_id' => $id))); Thank you for this tips, it runs very well (even if it is a few more slow and weighty) Best regards. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Question about I18n and relation
Hi, El 30/08/2010, a las 16:56, MoAX escribió: Informations about my category are retrieved and its title from the i18n table too. But items title and description (in the i18n table) are not retrieved while their informations are. Is a limitation in the Translate Behavior. Related models are not translated. There are several workarounds. For example: $this->Category->recursive = -1: $category = $this->Category->read(null, $id) $items = $this->Category->Item->find('all', array('conditions' => array('category_id' => $id))); Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Question about I18n and relation
Someone can do an effort please. I still have no solution. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Question about I18n and relation
Hi, I have a question about i18n. I have 2 models linked together (Category hasMany Item) (Item belongsTo Category ;-) ) When I do $this->Category->read(null, $id); in the controller, something not usual happens. Informations about my category are retrieved and its title from the i18n table too. But items title and description (in the i18n table) are not retrieved while their informations are. This is what give me debug($data); Array ( [Category] => Array ( [id] => 1 [visible] => 1 [locale] => eng [title] => Staplers //the title of the i18n table ) [Item] => Array ( [0] => Array ( [id] => 3 [category_id] => 1 [new] => 1 [visible] => 1 Where is my title and my description ? (This doesn't work while find('all') works) ) [1] => Array ( [id] => 4 [category_id] => 1 [new] => 1 [visible] => 1 ) ) ) I didn't find anything to solve this problem. Please help me. Regards. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en