Closed orende closed 1 year ago
A question if I may. Just wondering about these changes to the domain model.. Is mixing JPA/ORM into the model considered good practice? I would think not, but what is the argument? Would it perhaps be cleaner to do OR mapping inside the repository implementations?
A question if I may. Just wondering about these changes to the domain model.. Is mixing JPA/ORM into the model considered good practice? I would think not, but what is the argument? Would it perhaps be cleaner to do OR mapping inside the repository implementations?
Good question. Prior to this refactoring the Hibernate mapping was also closely tied to the domain objects even though the connection was not in the java-code itself but in a xml-file. So I would argue that we have not changed the design and that your question is about if this is a preferable design or not. Let's continue this discussion here
Replaces the Hibernate repository layer with a Spring Data JPA layer. Also replaces the XML-mapping files with annotations on the model classes.