#6520: bindModel() not binding to count(*) query
-----------------------+----------------------------------------------------
    Reporter:  espeed  |         Owner:           
        Type:  Bug     |        Status:  new      
    Priority:  Medium  |     Milestone:  1.2.x.x  
   Component:  Model   |       Version:  1.2 Final
    Severity:  Normal  |    Resolution:           
    Keywords:          |   Php_version:  n/a      
Cake_version:          |  
-----------------------+----------------------------------------------------
Comment (by espeed):

 {{{
 Nr      Query   Error   Affected        Num. rows       Took (ms)
 1       DESCRIBE `users`                7       7       2
 2       DESCRIBE `groups`               2       2       2
 3       SELECT nextval();               1       1       1
 4       DESCRIBE `objs`         9       9       2
 5       SELECT COUNT(*) AS `count` FROM `users` AS `User` WHERE
 ((`Obj`.`permissions` & 4 <> 0) OR (((`Obj`.`permissions` & 32 <> 0) AND
 (`Obj`.`group_id` & 1 <> 0))) OR (((`Obj`.`permissions` & 256 <> 0) AND
 (`Obj`.`owner_id` = '1000')))) 1054: Unknown column 'Obj.permissions' in
 'where clause'                        0
 6       SELECT `User`.`id`, `User`.`first_name`, `User`.`last_name`,
 `User`.`username`, `User`.`password`, `User`.`memberships`,
 `User`.`group_id`, `Group`.`id`, `Group`.`name`, `Obj`.`id`, `Obj`.`type`,
 `Obj`.`owner_id`, `Obj`.`group_id`, `Obj`.`permissions`, `Obj`.`status`,
 `Obj`.`created`, `Obj`.`modified`, `Obj`.`active_p` FROM `users` AS `User`
 LEFT JOIN `groups` AS `Group` ON (`User`.`group_id` = `Group`.`id`) LEFT
 JOIN `objs` AS `Obj` ON (`User`.`id` = `Obj`.`id`) WHERE
 ((`Obj`.`permissions` & 4 <> 0) OR (((`Obj`.`permissions` & 32 <> 0) AND
 (`Obj`.`group_id` & 1 <> 0))) OR (((`Obj`.`permissions` & 256 <> 0) AND
 (`Obj`.`owner_id` = '1000')))) LIMIT 20
 }}}

-- 
Ticket URL: <https://trac.cakephp.org/ticket/6520#comment:2>
CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/>
Cake is a rapid development framework for PHP which uses commonly known design 
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. 
Our primary goal is to provide a structured framework that enables PHP users at 
all levels to rapidly develop robust web applications, without any loss to 
flexibility.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"tickets cakephp" group.
To post to this group, send email to tickets-cakephp@googlegroups.com
To unsubscribe from this group, send email to 
tickets-cakephp+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to