querydsl
-
JPA - JoinTech/SpringBoot 2019. 12. 8. 11:55
커뮤니티 게시판 테이블 쿼리: 특정 직업을 가진 사람들이 쓴 글의 정보와 사용자 정보를 조회하는 SQL 는 다음과 같을 것이다 select t.topic_seq '번호',t.title '제목',m.name '작성자',p.title '직업',t.created_at '작성일' from `member` m join `topic` t on m.member_seq = t.member_seq join `profile` p on p.profile_seq = m.profile_seq where p.profile_seq=1; query 결과는 아래와 같을 것이다. JPA 로 해당 부분을 구현 하는 과정은 아래와 같다. JPAQueryFactory 설..
-
usage spring data jpa with query dslTech/SpringBoot 2019. 7. 14. 17:27
-- dependency com.querydsl querydsl-apt com.querydsl querydsl-jpa org.springframework.boot spring-boot-maven-plugin com.mysema.maven apt-maven-plugin 1.1.3 process target/generated-sources/java com.querydsl.apt.jpa.JPAAnnotationProcessor -- created databaseConfig.java @Configuration public class Databaseconfig { @Bean public JPAQueryFactory queryFactory(EntityManager em) { return new JPAQueryFac..