Thats not a bug. Take a look at the Model::create() method. The record
is being passed to create(), which sets $this->data in the model,
which save() reads if it doesn't have data passed explicitly to it, as
in the following save() call.
On Jan 12, 7:40 am, lordG <[EMAIL PROTECTED]> wrote:
> Hey Guys,
>
> The saveAll function was not saving my data. I had a look at the code
> of the saveAll...
>
> Noticed the saveAll function seems to not be saving the data...
>
> lines 1365 to 1370 was:
> ------
> foreach ($data as $record) {
> if (!($this->create($record) && $this->save($null,
> $options['validate'], $options['fieldList'])) && $options['atomic']) {
> $db->rollback($this);
> return false;
> }}
>
> ----
>
> The $this->save(null ... is it meant to be null?
>
> I have modded it to:
> ---
> foreach ($data as $record) {
> if (!($this->create($record) && $this->save($record,
> $options['validate'], $options['fieldList'])) && $options['atomic']) {
> $db->rollback($this);
> return false;
> }}
>
> ---
>
> I also manually insert the fixhttps://trac.cakephp.org/changeset/6337,
> so that the function returned true if no falses.
>
> Is this a bug, should I post a ticket?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---