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:
have interface perform create request each record needs saved.
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
Post a Comment