Model::find(). Condition handled as an integer when it should be handled as a string

2008-06-05 Thread aka
Hi! Found this strange behavior when I was tracking down a bug on my Cake application. The easiest way is to reproduce this is to create the following sample application. 1. Set up the database: 2. Create the following table to the database CREATE TABLE `cars` ( `id` int(11) NOT NULL

Re: Model::find(). Condition handled as an integer when it should be handled as a string

2008-06-05 Thread Jonathan Snook
How would Cake be able to know that when you pass it a number that what you really mean is a string? Cake knows because it's DEFINEd the fields from the database. If it's VARCHAR, CHAR, or TEXT, treat it as a string. --~--~-~--~~~---~--~~ You received this

Re: Model::find(). Condition handled as an integer when it should be handled as a string

2008-06-05 Thread Chris Hartjes
On Thu, Jun 5, 2008 at 9:56 AM, Jonathan Snook [EMAIL PROTECTED] wrote: How would Cake be able to know that when you pass it a number that what you really mean is a string? Cake knows because it's DEFINEd the fields from the database. If it's VARCHAR, CHAR, or TEXT, treat it as a string.

Re: Model::find(). Condition handled as an integer when it should be handled as a string

2008-06-05 Thread Jonathan Snook
Cake knows because it's DEFINEd the fields from the database. If it's VARCHAR, CHAR, or TEXT, treat it as a string. /me smacks himself in the forehead. I had thought that was the case, but is that *really* what is going on? It looks to me like Cake is not honouring that for whatever