I see... looking through the translate behavior code, it seems that the translate joins are added directly via the the joins[] query parameter; which bypasses the normal joined models.
As a temporary workaround, I'd suggest doing this: $this->User->find('all',array('recursive'=>-1, 'fields' => array('User.*'))); (or defining the fields you need) Submit a ticket to trac. I'm sure the fix is easy (wrapping lines 117-128 with a condition on 'recursive' - although both the model's property and the query parameter will have to be taken into consideration); although I'm not familiar with the translate test cases so I'm not sure how hard it would be to write a test case to prove your point. hth grigri On Oct 9, 11:11 am, nastya <[EMAIL PROTECTED]> wrote: > then it triggers everything with Group and Style which I don't need. > > If Translate behavior works with joins why does it put in the query: > > SELECT `User`.*, `Group`.*, `Style`.* > > when recursive = -1? this is not good, is it? > > especially that JOIN to I18n actually stays intact! it works fine with > recursive = -1 but only when there are no associations (in that case > there is actually no need for recursive = -1...) : > > $model->recursive=-1; > $model->contain=false; > $users=$model->find('all'); > > SELECT `User`.*, `Group`.*, `Style`.*, `I18n__description`.`content` > FROM `users` AS `User` LEFT JOIN `i18n` AS `I18n__description` ON .... > etc > > as you can see LEFT JOIN `i18n` is there. > and this gives the error mentioned above. > > On Oct 9, 11:54 am, grigri <[EMAIL PROTECTED]> wrote: > > > It's not a bug. The translate behavior works with joins; ergo if you > > disable all joins (recursive -1) it won't work. Try setting recursive > > to 0. > > > On Oct 9, 10:24 am, nastya <[EMAIL PROTECTED]> wrote: > > > > you are right. It's Translate behavior. As soon as I betach it the > > > query works... > > > > the questions are now the same: > > > > can someone help to change Translate behavior or find function > > > to eliminate this error? > > > is there a way to get it work? > > > > or I have to submit a bug? > > > > On Oct 8, 7:41 pm, teknoid <[EMAIL PROTECTED]> wrote: > > > > > I wonder if there is some conflict in the translate behavior... > > > > > Have you tried with: $this->User->recursive = -1; $this->User- > > > > > >find('all'); --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---