We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ef8ec80 commit 9193dd1Copy full SHA for 9193dd1
HibernateSpringBootDtoCustomResultTransformer/src/main/java/com/bookstore/dao/AuthorDao.java
@@ -0,0 +1,9 @@
1
+package com.bookstore.dao;
2
+
3
+import com.bookstore.dto.AuthorDto;
4
+import java.util.List;
5
6
+public interface AuthorDao {
7
8
+ public List<AuthorDto> fetchAuthorWithBook();
9
+}
HibernateSpringBootDtoCustomResultTransformer/src/main/java/com/bookstore/dao/Dao.java
@@ -10,11 +10,12 @@
10
import org.springframework.transaction.annotation.Transactional;
11
12
@Repository
13
-public class Dao {
+public class Dao implements AuthorDao {
14
15
@PersistenceContext
16
private EntityManager entityManager;
17
18
+ @Override
19
@Transactional(readOnly = true)
20
public List<AuthorDto> fetchAuthorWithBook() {
21
Query query = entityManager
0 commit comments