php - Better approach for creating multiple records using data mapper? -


i wondering of following 2 approaches better creating multiple records using data mapper pattern.

firstly, little background: have web application. interface done in flex/actionscript , business logic done in php. http requests used send requests , receive responses business logic. business logic implemented mvc style. front controller loads appropriate controller , executes appropriate action when valid request received.

as far understand data mapper pattern, model represents single record/row of database. application works great creating, updating , retrieving single objects.

i @ point create several objects simultaneously. 2 approaches have in mind follows:

  1. have interface perform create request each record needs saved.

  2. send array of objects need saved , have controller call mapper's save action each of items in array.

or there better way available creating multiple records?


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -