Hi Wayne

Thanks for the suggestions.  Your second option did the trick and has 
gotten me out of trouble.

Ultimately though I really want to understand why this is happening.  If 
I can find a solution, then perhaps I can contribute it back to the project.

Thanks again for you input.

Regards,
Langdon




Wayne Fay wrote:
> Try adding a beforeSave() method in your model that sets the datatype
> to "string" for the UUID member with PHP's settype().
> 
> Or modify the UUID method itself so the first character in your UUID
> is always "A" or another alpha char.
> 
> Wayne
> 
> On 10/13/07, Langdon Stevenson <[EMAIL PROTECTED]> wrote:
>> I have a Cake project that uses a unique id string generated by PHP as
>> the id for each table (to allow ids to be unique across the entire project).
>>
>> However I have an odd edge case problem where by occasionally the UUID
>> function will throw up a string that is all numeric (with a period .
>> separating the two halves) rather than being a mix of alpha and numeric.
>>
>> When this happens Cake constructs the find and delete queries without
>> quotes around the id string.  This results in MySQL interpreting the
>> string as type: DOUBLE, so I get a query error.
>>
>> Can anyone point me to the code in the Cake core that makes this
>> decision about encasing the id in quotes so that I can have a look at
>> fixing this issue?
>>
>> My solution for now is to simply test new ids and ensure that they use a
>> mix of character types, but it would be better to fix the root of the
>> problem.
>>
>> Thanks in advance.
>>
>> Regards,
>> Langdon
>>
> 
> > 

--~--~---------~--~----~------------~-------~--~----~
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