Yes, it is intended.

In Cake 1.2.x you should always use $this->create() before a save that
is intended to be an INSERT - I'm not sure if this function exists in
1.1.x.  But setting $this->id to false or null is the basic
requirement.


On Oct 24, 2:43 am, flipcode <[EMAIL PROTECTED]> wrote:
> this code does not not behave as expected:
>
> $this->save($entry1,false,null);
> $this->save($entry2,false,null);
>
> actually the second save becomes an UPDATE instead of an INSERT (which
> i would expect).
>
> it has to be changed to
>
> $this->save($entry1,false,null);
> $this->id = false;
> $this->save($entry2,false,null);
>
> when i look at the model save function i see some cleanup code at the
> end of it ... however the stored id leads to an implicit sql UPDATE.
>
> is this the intended behaviour?


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