Create pack of users with saveAll(), then extract unique user
identifiers from initial data (commonly username) and retrieve IDs by
find('all') with this condition.Reasons: 1. Multi-save cannot return all new IDs created. 2. Queries in a loop are much worse then single query for all. On Nov 18, 8:15 am, Jas <[email protected]> wrote: > Hi, > would it be possible to create a number of users using saveAll and get > the new id of each user as an array? > > Or would I be better off looping through each user and using save and > getLastInsertId? -- 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=.
