I'm working on the very same problem right now.  I'm actually
attempting it the console, but it shouldn't make a difference.  I
think it should likely be something similar to:

Array
(
    [ModelName1] => Array
        (
            [fieldname1] => 'value'
            [fieldname2] => 'value'
        )
    [ModelName2] => Array
        (
            [fieldname1] => 'value'
            [fieldname2] => 'value'
        )
)

Or, in my case, a simplified version of the actual array:

$formatted_data_array = array (
                    'Business' =>  array ('name' => $data['raw_data']
['name']),
                    'BusinessHours' => array ('business_hours' =>
$data['raw_data']['hours']),
                                          );

if(!$this->Business->saveAll($formatted_data_array))
    $this->out('Error Saving All:  '. $data['raw_data']['name']);

However, that's not working for me at the moment.

Does anyone else have any ideas?

- CakeFan




On Jan 4, 1:29 am, bpscrugs <[EMAIL PROTECTED]> wrote:
> Does anyone know how to properly format an array that works with 
> thesaveAllmethod? I have 3 associations in my data model, a hasMany and
> an HABTM, how would my array be set up in order for thesaveAllto
> work? I'm stumped and can't seem to find any documentation on 
> thesaveAllMethod. Thanks in advance!  -b
--~--~---------~--~----~------------~-------~--~----~
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