We are using the factory + builder pattern in order to build models throughout our applications. The builder pattern has the knowledge on how to get the database data in order to set the models attributes.
Are there papers or discussions concerning a pattern that would do this reversal workflow? From built models, how to insert/update them back to the database?
Right now this is something we are doing manually. It would be nice if we could give such models to a class which has the knowledge on how they are mapped in the database for updates or insertions.
Aucun commentaire:
Enregistrer un commentaire