$conditions=>array('OR' => array('Sales.id'=>'123', 'Customer.sales_id'=>'123') );
will use a boolean OR rather than AND. On Aug 23, 3:35 am, "Feris Thia" <[EMAIL PROTECTED]> wrote: > Hi All, > > I have 2 models => Sales (in MySQL server) and Customer (in SQL > Server) and I have "hasOne" association with them. > > It's working fine with pagination except when I need to add condition > for both models. With just one condition it is working fine, eg : > $conditions=> array('Sales.id'=>'123') . But when I have conditions > for both it contains no valid field error, eg: > $conditions=>array('Sales.id'=>'123', 'Customer.sales_id'=>'123'). > When I set debug to 2 it shows that the conditions being merged with > 'and' selection. > > What should I do to get it work with different db connections ? I use > $this->paginate('Sales', $conditions). > > Regards, > > Feris --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~----------~----~----~----~------~----~------~--~---