Too Long; Didn't Read
Developers created one entity class and one repository for each table in the relational data model. Over time, the volume of data grew, entities acquired additional fields, and the number of connections increased. At this point, the developers decided to write native SQL queries to improve performance. This created architectural problems since such queries often use the features of a particular SQL dialect for optimization. They are not validated during the build of the project and their maintenance in a working state depended on the responsibility of specific developers. There is another option, allocate a separate class for a shortened ViewModel that is read-only.