conditions being passed into a model->find() call. The field in the
database is always a 'text' datatype (postgresql), but sometimes acts
as a number and therefore I have to cast it, and its NOT possible to
switch these datatypes because the fields are dynamically created. If
I want to pass a condition such as:
array('"FIELD_NAME"::integer' => array(0, 1, 4, 5, 9))
to my find call, it will strip out the quotes from "FIELD_NAME" and
the query will fail. However, if I do a query such as
array('"FIELD_NAME"::integer' => 5))
or
array('"FIELD_NAME"::integer between ? and ?' => array(0, 9))
it seems to keep the quotes around "FIELD_NAME" and the query works.
We're using CakePHP 1.3.6... if this has already been addressed please
let me know! It's very frustrating and I really do not want to have to
create custom queries for these specific cases since Cake SHOULD
handle it correctly.
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
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
No comments:
Post a Comment