Sunday, November 1, 2009

Re: Model->saveAll() return value issue

Hi nikolay,

> My confusion is caused by the return value ot saveAll function - it is
> array containing 5 elements but not 3. Elements with value 1 for
> succeeded elements and 0 for unsuccessful stored elements suppose.
>
> Am I wrong or missing something and how can I retrieve what elements
> are stored successfully and what are failed.

Are your tables InnoDB? If they are, cake will wrap all queries in a
single transaction when you use saveAll, so if one fails, they all
fail.

hth

Jon


--
jon bennett - www.jben.net - blog.jben.net

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: