Hi,

I am using the translate behaviour in my models and so far it worked well. 
However, one issue I can't get fixed and I am not sure if this is me or 
cake. If I use a find('all') on my model everything works fine - however, 
if I use a find('list'), the result is [id]=>id (e.g. [22]=>22. Everything 
worked fine (and as expected) before I implemented the translate behaviour.

I did two debugs right after each other to show what I mean:


$categories=$this->Category->find('list', 
array(
 'conditions' => array(
 'Category.parent_id' => $id,
'Category.active' => 1
 )
)
); 
debug($categories);


returns

Array
(
    [22] => 22
)

  
while the same query with 'all'
  

$categories=$this->Category->find('all', 
array(
 'conditions' => array(
 'Category.parent_id' => $id,
'Category.active' => 1
 )
)
);   


returns:

customerweb_test/controllers/categories_controller.php (line 160) 
Array
(
    [0] => Array
        (
            [Category] => Array
                (
                    [id] => 22
                    [parent_id] => 1
                    [active] => 1
                    [created] => 2011-11-03 21:31:16
                    [modified] => 2013-08-15 00:23:48
                    [locale] => eng
                    [name] => Dummies with Engraving
                    [description] => 
                    [detailed_description] => 
                )

        )
)


Any ideas how to fix this?

Thanks a lot,
Christian

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to