Btw when I add debug($queryData); it confirms the contain array is present:
app\models\ticket.php (line 175) Array ( [conditions] => Array ( [Ticket.ticket_status] => New ) [fields] => Array ( [0] => Ticket.ticket_id ) [joins] => Array ( ) [limit] => 51 [offset] => [order] => Array ( [0] => ) [page] => 1 [group] => [callbacks] => 1 [contain] => Array ( [ClientUser] => Array ( [fields] => Array ( [0] => ClientUser.user_group_id ) ) ) ) But it is not taking effect in the sql: Warning (512): SQL Error: 1054: Unknown column 'ClientUser.user_site_id' in 'where clause' [CORE\cake\libs\model \datasources\dbo_source.php, line 525] Query: SELECT `Ticket`.`ticket_id` FROM `tickets` AS `Ticket` WHERE `Ticket`.`ticket_status` = 'New' AND `Ticket`.`ticket_support_group_id` = 2 AND `Ticket`.`ticket_status` != 'Deleted' AND ((`Ticket`.`ticket_client_group_id` = 84) AND (`ClientUser`.`user_site_id` = 204) AND (((`Ticket`.`ticket_openedby` = 1024) OR (`Ticket`.`ticket_client_user_id` = 1024)))) LIMIT 51 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---