I am working on a new project in which I am ordered not to use ORM. The software operates on one main model class that has some collection and complicated object fields.
The different operations in the software will only need some of the fields to be populated and may query for the main model based on different conditions.
This requirement would be trivial to implement with an ORM, but I am struggling to design a persistence layer without it.
The main issue is the ridiculous amount of duplication among the SQL queries in the DAOs and lack of safeguards against accessing fields are not loaded.
What kind of patterns do people use to write the model classes and the DAOs without ORMs?
I have looked at less ORM-ish tools that might be allowed like MyBatis but they seems to focus on automating the mapping, which is not a big issue for me...
Aucun commentaire:
Enregistrer un commentaire