hi

I'm using 1.2 and have a strange problem.

there are three models:

   Author
   Theme
   Post which belongs to Author and Theme

now i want to get the Posts but with recursive =-1.
when i put:

     $this->paginate['recursive']=-1;
     $items = $this->paginate($this->modelClass,$scope);

i have an error:

   SQL Error: 1051: Unknown table 'Theme'

and query looks like this:

   Query: SELECT `Post`.*, `Theme`.*, `Author`.*,
`I18n__title`.`content`, `I18n__description`.`content` FROM `posts` AS
`Post` LEFT JOIN `i18n` AS `I18n__title` ON (`Post`.`id` =
`I18n__title`.`foreign_key` AND `I18n__title`.`model` = 'Post' AND
`I18n__title`.`field` = 'title') LEFT JOIN `i18n` AS
`I18n__description` ON (`Post`.`id` =
`I18n__description`.`foreign_key` AND `I18n__description`.`model` =
'Post' AND `I18n__description`.`field` = 'description') WHERE
`I18n__title`.`locale` = 'eng' AND `I18n__description`.`locale` =
'eng' ORDER BY `Post`.`place` ASC

the same query i get if i put:

   $this->Post->contain();
   $t=$this->Post->find('all');

or:

  $t=$this->Post->find('all',array('recursive'=>-1));

why does it look for Theme and Author??!!! It shouldn't do so, no?
If I don't mention contain or recursive -> it's ok: it finds all the
data. But if I try to get nice queries just with data that I need, it
doesn't work...
Can anyone help me please?

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to