I've been thinking about switching to UUIDs myself and so did a little
digging. If you look at the source for Model::__saveMulti() you'll see
what's happening:
01287 if ((is_string($row) && (strlen($row) == 36
|| strlen($row) == 16)) || is_numeric($row)) {
01288 $values = array(
01289 $db->value($id,
$this->getColumnType($this->primaryKey)),
01290 $db->value($row)
01291 );
01292 if ($isUUID) {
01293 $values[] = $db->value(String::uuid());
01294 }
and:
01320 if (!empty($newValues)) {
01321 $fields = array(
01322
$db->name($this->hasAndBelongsToMany[$assoc]['foreignKey']),
01323
$db->name($this->hasAndBelongsToMany[$assoc]['associationForeignKey'])
01324 );
01325 if ($isUUID) {
01326 $fields[] = $db->name($this->{$join}->primaryKey);
01327 }
I confess that I'm really not at all clear about what Cake is doing
here. That doesn't make sense to me. It appears to be deliberately
including the UUID twice.
On Tue, Jan 20, 2009 at 6:06 AM, Rob Wilkerson <[email protected]> wrote:
>
> On Mon, Jan 19, 2009 at 10:23 PM, brian <[email protected]> wrote:
>> What does the output look like when you have this:
>>
>> if (!empty($this->data))
>> {
>> die(debug($this->data));
>
> Here's the output:
>
> Array
> (
> [Event] => Array
> (
> [name] => My Linked Event
> [start_time_date] => 2009-07-26
> [start_time_hour] => 1
> [start_time_minute] => 00
> [start_time_ampm] => PM
> [end_time_date] =>
> [end_time_hour] =>
> [end_time_minute] =>
> [end_time_ampm] =>
> [location_id] => JACKBROWN
> [start_time] => 2009-07-26 13:00:00
> [end_time] =>
> )
>
> [Attraction] => Array
> (
> [Attraction] => 49414268-8a90-4497-856a-1b293b196446
> )
>
> )
>
> --
> Rob Wilkerson
> http://robwilkerson.org
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---