Re: CakePHP Model uses the wrong fields in SQL statements!
I've now confirmed this bug on two machines. Different Linux Dist,
different kernel, different hardware, slightly newer version of PHP.
The output is identical.
I also forgot to disable the cache on this instance of CakePHP, so
I've ruled that out.
second machine:
Ubuntu Linux 2.6.35-23-server #37-Ubuntu SMP Fri Nov 5 20:33:07 UTC
2010 x86_64 GNU/Linux
PHP 5.3.3-1ubuntu9.1 with Suhosin-Patch (cli) (built: Oct 15 2010
14:00:18)
Server version: Apache/2.2.16 (Ubuntu)
cakephp/maverick uptodate 1.3.2-1
add this line to the end of the for loop to get the correct query log:
$dbo->_queriesLog = array_slice($dbo->_queriesLog, -100);
The tail end of the query log:
[17]=>
array(5) {
["query"]=>
string(57) "INSERT INTO `foos` (`bar`, `baz`) VALUES (128921,
128922)"
["error"]=>
NULL
["affected"]=>
int(1)
["numRows"]=>
NULL
["took"]=>
float(0)
}
[18]=>
array(5) {
["query"]=>
string(35) "SELECT LAST_INSERT_ID() AS insertID"
["error"]=>
NULL
["affected"]=>
int(1)
["numRows"]=>
int(1)
["took"]=>
float(0)
}
[19]=>
array(5) {
["query"]=>
string(115) "SELECT `Foo`.`id`, `Foo`.`bar`, `Foo`.`baz` FROM
`foos` AS `Foo` WHERE `bar` = 86111 AND `baz` = 86112 LIMIT 1"
["error"]=>
NULL
["affected"]=>
int(1)
["numRows"]=>
int(1)
["took"]=>
float(6)
}
}
}
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home