I use Spring Data Repository
@Repository
public interface SomeRepository extends CrudRepository<Some, Long> {
}
And I have some jdbs methods for Some
entity. Big select with joins and etc. I implement it by NamedParameterJdbcTemplate
And I have 2 point for get data from DB:
SomeRepository
SomeDAO
(with native query, big selects)
How can I combine it?
I have 2 ways:
SomeService
injectSomeRepository
andSomeDAO
SomeDAO
injectSomeRepository
and have own methods and wrapp SomeRepository methods for CRUD