30%
61,600원
다른 수강생들이 자주 물어보는 질문이 궁금하신가요?
- 미해결실전! Querydsl
BooleanExpression 통합방식 질문~
String usernameParam = null; or nullInteger ageParam = null; or 10 private List<Member> searchMember2(String usernameCond, Integer ageCond) { return queryFactory .selectFrom(member) .where(allEq(usernameCond, ageCond)) .fetch();}private BooleanExpression usernameEq(String usernameCond) { return usernameCond != null ? member.username.eq(usernameCond) : null;}private BooleanExpression ageEq(Integer ageCond) { return ageCond != null ? member.age.eq(ageCond) : null; }private BooleanExpression allEq(String usernameCond, Integer ageCond){ /* if(usernameCond == null){ if(ageCond != null) return ageEq(ageCond); else return null; }*/ return(ageEq(ageCond)).and(usernameEq(usernameCond));} 1) 강의에서 BooleanExpression 통합방식에서 1-1 ) usernameParam이 null , age 값셋팅 , 널포인트 익셉션이 발생 1-2 ) age 값을 null로하고 usernameParam 에 값셋팅 하면 널포인트 익셉션이 안납니다.. 경우 1-1), 1-2) 의차이가 어디서 나오는지 잘모르겠습니다. 2) 널포인트 익셉션을 방지하기위해 주석처럼 처리해도될까요? (널포인트 익셉션은 안터집니다)
- 미해결실전! Querydsl
projection 다른테이블에 있는 필드도 함께 조회
안녕하세요~ 궁금증이생겨서요 스프링데이터 JPA강의 에서 projections는 1. @Value를 이용해서 다른 엔티티에있는 필드값도 함께 조회하거나 2.중첩 구조처리? 같은걸로 다른 엔티티필드 값을 함께 조회했는데요 이경우 root엔티티에 해당되는 필드는 최적화가 되지만 root 엔티티가 아닌 필드를 조회할때는 최적화가 안되었습니다~ 그런데 쿼리 Dsl로 두 엔티티필드를 조회했더니 두 엔티티다 최적화가 된거같아서요~ (제가 직접 join문을 해서 해당필드만 가져와서 되는걸까요? , 스프링 데이터 JPA projections 는 지금 저 join 쿼리를 혼자서는 아직 최적화를 못하는거구요~?~) 이것도 쿼리 dsl의 장점인가요? , 아니면 제가 뭘 잘못 알고있는 걸까요? 결과
- 미해결실전! Querydsl
JPAQueryFactory 빈등록
JPAQueryFactory를 매번 Repository마다 만들지 않고 빈으로 등록해서 사용하면 안 되나요??
- 미해결실전! Querydsl
application.yml vs persistence.xml
공부를하다가 두 곳에 모두 중복된 코드들이 있는 것 같아서 혹시나 하고 persistence.xml을 삭제하고 돌렸는데 아무 이상없이 CRUD가 다 성공했습니다. 굳이 persistence.xml이 필요없는 것 같은데 맞나요?? emf만들때나 그럴때 쓴다고 공부했던것 같은데, 해당 xml이 없어도 돌아가는 것 보니 문제는 없는거 같고.. 그래서 핵심질문은 아래와 같습니다. 1. 굳이 둘다 있어야 하나요? 돌려보니까 application.yml만 있어도 돌아가는것 같습니다. 2. 둘의 차이점이 뭘까요? application.yml은 어플리케이션 전체에 영향을 주는 설정이고, persistence.xml은 JPA만 영향을 주는 설정인데, application.yml과 persistence.xml이 둘다 있으면 application.yml이 우선순위를 갖는 건가요?둘다 만들어놓고, yml파일은 h2 DB를, xml파일은 mysql을 설정해놓았는데 h2로 돌아갔습니다. 3. 연관관계 매핑을 할 때 예를들어, Member -> Team -> Country 이 3개의 엔티티가 Member와 Team도 다대일, Team과 Country도 다대일 관계일 때, 모든 데이터를 쿼리 한방에 다 끌고 와서 영속성컨텍스트에 저장하려면 페치조인을 어디에 써야하나요? queryFactory . select(member) .from(member) .join(member.team, team) .join(team.country, country).fetchJoin() .fetch() 인지 아니면, queryFactory . select(member) .from(member) .join(member.team, team).fetchJoin() .join(team.country, country) .fetch() 인지 아니면, queryFactory . select(member) .from(member) .join(member.team, team).fetchJoin() .fetch() 만 쓰면 그 연관된 것들도 쭉쭉 전부 다 페치조인이 적용되는지 아니면, queryFactory . select(member) .from(member) .join(member.team, team).fetchJoin() .join(team.country, country).fetchJoin() .fetch() 인지 궁금합니다.fetchJoin()은 한번만 쓰라고 했던 것 같은데마지막의 경우처럼 해도되는지도 궁금합니다.
- 해결됨실전! Querydsl
h2 database 연동 관련 문제
안녕하세요, 항상 유익한 강의 감사합니다!! 현재 안정화 버전으로 h2 데이터베이스를 설치하였으며, application.yml 생성 이후에 테스트 코드를 진행하게 되면 강의에서는 Hello 테이블이 생성되는걸 확인할 수 있는데 제가 진행하였을때는 테이블이 생성되지 않습니다..ㅠㅠ 로그를 확인해보니 트랜잭션 롤백이 발생하는 것 같은데 원인을 모르겠습니다.. 관련 로그 첨부 드립니다. 2021-08-02 11:44:40.513 INFO 49375 --- [ main] study.querydsl.QuerydslApplicationTests : Starting QuerydslApplicationTests using Java 11.0.11 on moony.local with PID 49375 (started by moonbohyeon in /Users/moonbohyeon/IdeaProjects/querydsl) 2021-08-02 11:44:40.515 INFO 49375 --- [ main] study.querydsl.QuerydslApplicationTests : No active profile set, falling back to default profiles: default 2021-08-02 11:44:41.157 INFO 49375 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. 2021-08-02 11:44:41.182 INFO 49375 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 18 ms. Found 0 JPA repository interfaces. 2021-08-02 11:44:41.690 INFO 49375 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... 2021-08-02 11:44:41.859 INFO 49375 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. 2021-08-02 11:44:41.946 INFO 49375 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default] 2021-08-02 11:44:41.989 INFO 49375 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.4.32.Final 2021-08-02 11:44:42.115 INFO 49375 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final} 2021-08-02 11:44:42.228 INFO 49375 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect 2021-08-02 11:44:42.766 DEBUG 49375 --- [ main] org.hibernate.SQL : drop table if exists hello CASCADE 2021-08-02 11:44:42.767 DEBUG 49375 --- [ main] org.hibernate.SQL : drop sequence if exists hibernate_sequence 2021-08-02 11:44:42.768 DEBUG 49375 --- [ main] org.hibernate.SQL : create sequence hibernate_sequence start with 1 increment by 1 2021-08-02 11:44:42.770 DEBUG 49375 --- [ main] org.hibernate.SQL : create table hello (id bigint not null, primary key (id)) 2021-08-02 11:44:42.775 INFO 49375 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform] 2021-08-02 11:44:42.782 INFO 49375 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' 2021-08-02 11:44:42.988 WARN 49375 --- [ main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning 2021-08-02 11:44:43.544 INFO 49375 --- [ main] study.querydsl.QuerydslApplicationTests : Started QuerydslApplicationTests in 3.427 seconds (JVM running for 4.713) 2021-08-02 11:44:43.666 INFO 49375 --- [ main] o.s.t.c.transaction.TransactionContext : Began transaction (1) for test context [DefaultTestContext@78f5c518 testClass = QuerydslApplicationTests, testInstance = study.querydsl.QuerydslApplicationTests@6b6c0b7c, testMethod = contextLoads@QuerydslApplicationTests, testException = [null], mergedContextConfiguration = [WebMergedContextConfiguration@2f48b3d2 testClass = QuerydslApplicationTests, locations = '{}', classes = '{class study.querydsl.QuerydslApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.autoconfigure.actuate.metrics.MetricsExportContextCustomizerFactory$DisableMetricExportContextCustomizer@d23e042, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@69ee81fc, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@29f7cefd, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@9816741, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@36804139, org.springframework.boot.test.context.SpringBootTestArgs@1, org.springframework.boot.test.context.SpringBootTestWebEnvironment@6366ebe0], resourceBasePath = 'src/main/webapp', contextLoader = 'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]], attributes = map['org.springframework.test.context.web.ServletTestExecutionListener.activateListener' -> true, 'org.springframework.test.context.web.ServletTestExecutionListener.populatedRequestContextHolder' -> true, 'org.springframework.test.context.web.ServletTestExecutionListener.resetRequestContextHolder' -> true, 'org.springframework.test.context.event.ApplicationEventsTestExecutionListener.recordApplicationEvents' -> false]]; transaction manager [org.springframework.orm.jpa.JpaTransactionManager@602aeb87]; rollback [true] 2021-08-02 11:44:43.756 DEBUG 49375 --- [ main] org.hibernate.SQL : call next value for hibernate_sequence 2021-08-02 11:44:43.969 DEBUG 49375 --- [ main] org.hibernate.SQL : insert into hello (id) values (?) 2021-08-02 11:44:43.973 DEBUG 49375 --- [ main] org.hibernate.SQL : select hello0_.id as id1_0_ from hello hello0_ 2021-08-02 11:44:44.025 INFO 49375 --- [ main] o.s.t.c.transaction.TransactionContext : Rolled back transaction for test: [DefaultTestContext@78f5c518 testClass = QuerydslApplicationTests, testInstance = study.querydsl.QuerydslApplicationTests@6b6c0b7c, testMethod = contextLoads@QuerydslApplicationTests, testException = [null], mergedContextConfiguration = [WebMergedContextConfiguration@2f48b3d2 testClass = QuerydslApplicationTests, locations = '{}', classes = '{class study.querydsl.QuerydslApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.autoconfigure.actuate.metrics.MetricsExportContextCustomizerFactory$DisableMetricExportContextCustomizer@d23e042, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@69ee81fc, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@29f7cefd, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@9816741, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@36804139, org.springframework.boot.test.context.SpringBootTestArgs@1, org.springframework.boot.test.context.SpringBootTestWebEnvironment@6366ebe0], resourceBasePath = 'src/main/webapp', contextLoader = 'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]], attributes = map['org.springframework.test.context.web.ServletTestExecutionListener.activateListener' -> true, 'org.springframework.test.context.web.ServletTestExecutionListener.populatedRequestContextHolder' -> true, 'org.springframework.test.context.web.ServletTestExecutionListener.resetRequestContextHolder' -> true, 'org.springframework.test.context.event.ApplicationEventsTestExecutionListener.recordApplicationEvents' -> false]] 2021-08-02 11:44:44.035 INFO 49375 --- [ionShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' 2021-08-02 11:44:44.036 INFO 49375 --- [ionShutdownHook] .SchemaDropperImpl$DelayedDropActionImpl : HHH000477: Starting delayed evictData of schema as part of SessionFactory shut-down' 2021-08-02 11:44:44.036 DEBUG 49375 --- [ionShutdownHook] org.hibernate.SQL : drop table if exists hello CASCADE 2021-08-02 11:44:44.039 DEBUG 49375 --- [ionShutdownHook] org.hibernate.SQL : drop sequence if exists hibernate_sequence 2021-08-02 11:44:44.041 INFO 49375 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... 2021-08-02 11:44:44.044 INFO 49375 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
- 미해결실전! Querydsl
Gradle에서 deprecated 문제가 있습니다.
plugins { id 'org.springframework.boot' version '2.5.3' id 'io.spring.dependency-management' version '1.0.11.RELEASE' id 'java' //querydsl 추가 id "com.ewerk.gradle.plugins.querydsl" version "1.0.10"}group = 'study'version = '0.0.1-SNAPSHOT'sourceCompatibility = '11'configurations { compileOnly { extendsFrom annotationProcessor }}repositories { mavenCentral()}dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-web' compileOnly 'org.projectlombok:lombok' runtimeOnly 'com.h2database:h2' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' //querydsl 추가 implementation 'com.querydsl:querydsl-jpa'}test { useJUnitPlatform()}//querydsl 추가 시작def querydslDir = "$buildDir/generated/querydsl"querydsl { jpa = true querydslSourcesDir = querydslDir}sourceSets { main.java.srcDir querydslDir}configurations { querydsl.extendsFrom compileClasspath}compileQuerydsl { options.annotationProcessorPath = configurations.querydsl}//querydsl 추가 끝 영한님이 올려주신대로 그대로 gradle 코드를 작성하여 돌려보았는데, The AbstractCompile.destinationDir property has been deprecated. This is scheduled to be removed in Gradle 8.0. Please use the destinationDirectory property instead. 이런 오류가 뜨더군요. 그래서 오류에 나와있는 해결방법대로 destinationDir를 찾아 바꿔주려하는데 이와 똑같은 단어가 gradle내에 존재하지 않아서 어떤걸 바꿔줘야할지 모르겠습니다. 뒤가 Dir로 끝나는 것들을 전부 Directory로 바꿔주면서 해봤는데도 잘 안되더군요. 혹시 어디를 수정하면 될까요?
- 미해결실전! Querydsl
캐스팅 관련 질문드리고 싶습니다!
안녕하세요, 영한 선생님. 강의 늘 즐겁게 잘 듣고 있습니다. 다름이 아니라, nativeQuery 를 querydsl로 수정하는 부분에서 질문이 있습니다. querydsl 에서 Qclass 는 StringPath 타입으로 변수를 가져와서 order.toString 으로 변환할 수가 없어서 해결을 못하고 있습니다... 이런 경우 어떤 식으로 해야하는지 여쭤봐도 될까요..? 현재 테이블이 실무에서 사용하는 테이블인데 애초에 order 를 String 이 아니라 number로 설계를 했어야했는데, 테이블을 수정하지 않은채 짜는 방법이 궁금해 여쭤봅니다!! 좋은 강의 늘 감사합니다! ㅎㅎ EmployeeRank { String name; String order; String department; } nativeQuery : update EmployeeRank set order = to_char(to_number(order)-1) where to_number(order) > to_number( :order) ; 제가 생각하는 querydsl (:order 은 input 변수로 들어옵니다) queryfactory .update(employeeRank) .set(employeeRank.order, String.valueOf(Integer.parseInt(:order)-1)) .where(???) .execute();
- 미해결실전! Querydsl
List 를 Map으로 변환할 수 있을까요?
List<MemberDto> 조회 결과를 Map형태로 변경해서 받을 수는 있나요??
- 미해결실전! Querydsl
v3-1 방식으로 Querydsl 사용할 때
삭제된 글입니다
- 미해결실전! Querydsl
조회질문
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 user 엔티티 일부 @OneToMany(mappedBy = "user",cascade = CascadeType.ALL)private List<UserCountry> country = new ArrayList<>();@OneToMany(mappedBy = "user",cascade = CascadeType.ALL)private List<UserLanguage> language=new ArrayList<>();@OneToMany(mappedBy = "user",cascade = CascadeType.ALL)private List<UserHopeLanguage> hopeLanguage=new ArrayList<>(); 프로젝트 진행중인데 궁금한점이 있어 여쭤보려고합니다. 엔티티 상에서는 테이블 구성은 일대다 다대일 관계로 위와 같이 되어있고 user들은 모국어인 userCountry, 배우고싶은 언어인 userHopeLanguage, 할수있는언어인userLanguage를 여러개 가질 수있습니다. 전체 유저 조회중 특정 나라나 언어를 가지고 있는 유저들만 검색하기위해 동적쿼리문을 작성하려고 하는데 예를 들어 유저가 가지고있는 userLanguage 중 language이름이 'kor '를 포함하고있는 유저만 검색 한다고 했을 때 쿼리문을 어떻게 작성해야할까요?
- 미해결실전! Querydsl
EntityManager thread-safe 문제
안녕하세요 영한님 !! EntityManager 생성시에, final로 주입받으시거나 @PersistenceContext를 사용해서 주입받으시거나 둘 중에 하나로 코드를 작성하시는 것을 보았는데요!! 제가 알기로는 Entitymanager의 thread-safe하지 않은 문제를 해결하기위해서 @PersistenceContext를 사용하여 프록시 객체로 감싸서 생성함으로써 thread-safe하지 않은 문제를 해결해준다고 알고있었는데요, 그렇다면 final로 주입시에는 프록시 객체로 감싸서 주입받는게 아닌, 진짜 bean을 주입 받기 때문에 thread-safe하지 않다고 봐야할까요?? 감사합니다!! :)
- 미해결실전! Querydsl
벌크 연산 수행후 flush( ) 사용 질문
안녕하세요 강의 잘 듣고 있습니다!^^ 벌크 연산 수행후 영속성 컨텍스트와 DB의 값이 달라지기 때문에 em.flush( ), em.clear( ) 를 해주면 된다고 하셨는데 이미 DB에는 값이 저장 되었는데 flush( )를 해주는 이유가 있을까요? clear( )만 해주면 안되나요?
- 미해결실전! Querydsl
안녕하세요. query에 대해 질문이 있습니다.
안녕하세요. 기존 MyBatis에서는 <where> <if test="name != null and name != ''"> name LIKE concat('%', '#{name}, '%') </if> <if test="loc != null and loc != ''"> OR loc LIKE concat('%', #{loc}, '%') </if> </where> ORDERY BY deptno DESC 이런 쿼리문이 있는데요. 공학이 포함된 이름만 보여주는 걸 짜고 있는데요. 기존 강의에서 conatains()를 하면 like '%member%' 이렇게 된다고 알려주셨는데 이런경우는 contains() 로 하고 or절로 하는게 괜찮을까요? 아니면 where 다중 파라미터로 하는게 나을까요.. 제가 먼저 다중파라미터로 해보고 있는데요. 예제에서는 String usernameParam = "XXX"; Integer ageParam = 10; 이런식으로 한개만 먼저 하셨는데 미리 사전데이터 입력같은 경우는 어떻게 해야될지 모르겠어서 질문드립니다. ㅜ (Test 파일에다가 assertThat 테스트 하려고 미리 넣어둔 데이터 입니다.) @BeforeEachpublic void before() { queryFactory = new JPAQueryFactory(em); Department department1 = new Department("컴퓨터공학과", "103호"); Department department2 = new Department("정보통신공학과", "103호"); Department department3 = new Department("음악과", "104호"); Department department4 = new Department("국어국문과", "104호"); em.persist(department1); em.persist(department2); em.persist(department3); em.persist(department4);
- 미해결실전! Querydsl
JPQL Concat 질문
안녕하세요 선생님! 수업 잘 듣고있습니다 : ) ! 질문이 있습니다. concat 문자열 합치기 처리는 JPQL 문에서 처리 하지 않고 entity column 값을 그대로 가져와서 자바에서도 합치는 처리가 가능할 것 같은데 보통은 어떻게 처리하는게 좋을까요? 저는 공부하면서 뭔가 JPA가 객체지향 SQL을 사용하기 때문에 가능한 데이터를 entity 에 맞춰 그대로 값을 가져오고 자바에서 객체지향처럼 조작해서 처리하는게 것이 재사용성이 있어서 좋다고 생각했는데 실무 경험이 많이 없어서 어떤 기준을 잡아야 할지 헷갈리네요!
- 미해결실전! Querydsl
N+1 문제 예시와 해결법 질문드립니다.
안녕하세요, 영한님. 강의를 통해 많은 것을 배우고 손이 편해지고 있어, 늘 감사하게 생각하고 있습니다. N+1 문제 에 대한 대표적 예제를 여쭤보고 싶어 질문드립니다. N+1 문제에 대해 말씀해 주실 때, fetch Join 을 사용하는 경우 대부분의 N+1 문제를 해결할 수 있다고 하셨는데, fetch Join 을 사용하더라도 해결이 안 되는 N+1 문제의 예제가 궁금해 문의드립니다. 만약 존재한다면, 간단한 해결법도 소개해주실 수 있으신지 여쭤보고 싶습니다.
- 해결됨실전! Querydsl
10:10 bulkUpdate 질문입니다.
안녕하세요! 강의 재밌게 듣고 있습니다. bulkUpdate 부분에서 flush, clear를 하지 않았는데도 업데이트 후의 값으로 나옵니다. hibernate 버전 업데이트의 영향인 걸까요? hibernate 버전은 5.5.10 을 쓰고 있습니다.
- 미해결실전! Querydsl
일대다 collection select 질문
JPA 활용 2강의 - 컬렉션 조회(One To Many) - v3.1 방법으로 ToOne 관계만 fetch join하고, batch_fetch_size 설정했습니다. QueryDsl에서 hospital 엔티티의 id를 통해 원하는 것만 조회하고 싶은데 reviewHospital가 List 형태라서 review.reviewHospitals.hospital.id.eq(id) 이런식으로 안 됩니다. 그래서 생각해낸 게 contain으로 JPAExpression을 이용해서 where 절에 hospital id를 입력해서. 병원에 해당하는 id를 검색했습니다. java.sql.SQLException: Subquery returns more than 1 row 그런데 위와같이 subQuery가 1개 이상이라고 오류가 나더군요. hospital.id에 맞는 여러 개의 Review들을 조회하고 싶은데 다른 방법이 있는지 궁금합니다.
- 미해결실전! Querydsl
선생님은 어떤 방법을 사용하시나요??
@QueryProjection의 단점을 말씀해주셨는데 선생님은 실무에서 어떤 방법을 주로 사용하시나요?
- 미해결실전! Querydsl
Querydsl은 where 조건절에 or 에 null 값이 못 들어가나요?
and는 4개 이상의 조건에서 특정 값이 null이 나오면 알아서 where 절에서 제외를 해주던데 or은 특이하게 nullException 오류가 나옵니다. and만 가능하고 or은 불가능한지 궁금합니다.
- 미해결실전! Querydsl
postgres 관련 공간 쿼리 가능 여부 질문입니다.
안녕하세요. 저는 주로 postgresql 을 사용하는데 공간 데이터 관련 postgis 공간 함수나 postgres의 with recursive 같은 구문을 사용해야 할 일들이 있는데 이런것들도 querydsl 을 사용하면 쓸 수 있을까요? 아니면 이런 것들은 네이티브 쿼리나 jdbc 템플릿, 마이바티스 등등.. 어떤걸 사용하는게 좋을지 궁금합니다.