Perhaps use the beforeFind callback in the model to convert into
proper SQL?

On Jan 4, 11:28 am, Claudia <[EMAIL PROTECTED]> wrote:
> Hi there
>
> Is there a way to prevent Cake from parsing the $order argument of a
> call to findAll?
> Example:
> $conditions = null;
> $fields        = null;
> $order        = '"Object__distance"::text::integer';
>
> $model->findAll($conditions, $fields, $order);
>
> The resulting order by clause produced by Cake is
> ORDER BY "Employee__distance"::text::integer"
> Note the unnecessary (and unterminated) quotation mark at the end
> which messes up the SQL.
>
> I have tried prepending the order statement with a -! as this seems to
> prevent CakePHP from parsing the condition part of queries but this
> workaround does not help for the order part.
>
> I know that I can write the SQL statement manually and then use $model-
>
> >query() But I would rather use as much cake as possible.
>
> Thanks for any tips
>
> Claudia
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to