In the model: $this->find("first", array( "conditions"=>array( "OrderDetail.id"=>"" ) ))));
Produces the following SQL where clause: WHERE `OrderDetail`.`id` = NULL That will never match any records (comparing anything directly with NULL always results in NULL, ie. comparing anything with an unknown will always produce an unknown answer) The correct syntax should be: WHERE `OrderDetail`.`id` IS NULL Shouldn't CakePHP use IS NULL when building the where clause for NULL values in comparisons? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---