Re: [CakePHP : The Rapid Development Framework for PHP] #6520: bindModel() not binding to count(*) query
#6520: bindModel() not binding to count(*) query ---+ Reporter: espeed | Owner: Type: Bug |Status: closed Priority: Medium | Milestone: 1.2.x.x Component: Model | Version: 1.2 Final Severity: Normal |Resolution: invalid Keywords: | Php_version: n/a Cake_version: | ---+ Changes (by gwoo): * status: new = closed * resolution: = invalid Comment: please see [8224] -- Ticket URL: https://trac.cakephp.org/ticket/6520#comment:3 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 -~--~~~~--~~--~--~---
Re: [CakePHP : The Rapid Development Framework for PHP] #6520: bindModel() not binding to count(*) query
#6520: bindModel() not binding to count(*) query ---+ Reporter: espeed | Owner: Type: Bug |Status: reopened Priority: Medium | Milestone: 1.2.x.x Component: Model | Version: 1.2 Final Severity: Normal |Resolution: Keywords: | Php_version: n/a Cake_version: | ---+ Changes (by espeed): * status: closed = reopened * resolution: invalid = Comment: Hi gwoo - Thanks for responding so quickly. None of the test cases in the [https://trac.cakephp.org/changeset/8224 8224 changeset] will produce this error because they don't modify $queryData to include the newly bound model. To reproduce this error, you have to modify $queryData to include the newly-bound model as part of a condition. After you do that, you will get an error similar to: {{{ SQL Error: 1054: Unknown column 'Obj.permissions' in 'where clause' }}} -- Ticket URL: https://trac.cakephp.org/ticket/6520#comment:4 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 -~--~~~~--~~--~--~---
Re: [CakePHP : The Rapid Development Framework for PHP] #6520: bindModel() not binding to count(*) query
#6520: bindModel() not binding to count(*) query ---+ Reporter: espeed | Owner: Type: Bug |Status: closed Priority: Medium | Milestone: 1.2.x.x Component: Model | Version: 1.2 Final Severity: Normal |Resolution: needmoreinfo Keywords: | Php_version: n/a Cake_version: | ---+ Changes (by gwoo): * status: reopened = closed * resolution: = needmoreinfo Comment: check the recursive level. If it is set to -1 the join will not be added. -- Ticket URL: https://trac.cakephp.org/ticket/6520#comment:5 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 -~--~~~~--~~--~--~---
Re: [CakePHP : The Rapid Development Framework for PHP] #6520: bindModel() not binding to count(*) query
#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 AffectedNum. 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 -~--~~~~--~~--~--~---