4

In our project we use classes generated by eclipse hibernate plugin for persistence. The generated classes have following structure.

MyClass extends BaseMyClass //POJO's, that are refenced in the hbm
files

MyClassDAO extends BaseMyClassDAO //DAO objects that use hibernate
session objects to provide CRUD API's for working with DB

My question is, would it violate Uncle Bobs clean architecture if we use the POJO classes used in the mapping files as the Entities in the innermost layer.

The hibernate specific DAO classes would belong in this case to the outermost layer and UseCases layer would communicate with this layer via providing an interface to be implemented.

Thanks in advance.

0 Answers0