사용자 도구

사이트 도구


java:hibernate:configuration

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
java:hibernate:configuration [2020/06/30 14:12]
kwon37xi [hibernate.globally_quoted_identifiers=true]
java:hibernate:configuration [2023/07/03 14:53] (현재)
kwon37xi [hibernate.query.fail_on_pagination_over_collection_fetch]
줄 1: 줄 1:
 ====== Hibernate Configurations ====== ====== Hibernate Configurations ======
-  * http://docs.jboss.org/hibernate/core/3.5/reference/en/html/session-configuration.html 
   * hibernate properties, property   * hibernate properties, property
 +  * [[https://github.com/hibernate/hibernate-orm/blob/main/hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java|org.hibernate.cfg.AvailableSettings]] 설정 상수 모음
 +  * [[https://github.com/hibernate/hibernate-orm/blob/main/hibernate-core/src/main/java/org/hibernate/cfg/Environment.java|org.hibernate.cfg.Environemnt]] 설정 상수 모음
 ===== hibernate.hbm2ddl.auto 프라퍼티 ===== ===== hibernate.hbm2ddl.auto 프라퍼티 =====
   * http://gyumee.egloos.com/2483659 참조.   * http://gyumee.egloos.com/2483659 참조.
줄 64: 줄 65:
   * [[java:hibernate:performance|Hibernate Performance Tuning]] 참조   * [[java:hibernate:performance|Hibernate Performance Tuning]] 참조
  
 +===== hibernate.query.fail_on_pagination_over_collection_fetch =====
 +  * [[https://vladmihalcea.com/hibernate-query-fail-on-pagination-over-collection-fetch/|How to detect HHH000104 issues with hibernate.query.fail_on_pagination_over_collection_fetch - Vlad Mihalcea]]
 +  * ''5.2.13'' 버전 이후 설정 가능. 
 +  * **To-Many** 관계를  join fetch 하게 되면 Many 측 관계로 인해서 정확한 갯수로 제약을 줄 수 없다. 이로 인해 하이버네이트는 모든 데이터를 다 가져온 뒤에 메모리에서 정렬하여 원하는 갯수만 획득하게 된다.
 +  * 이는 심각한 메모리 문제, 성능 저하를 일으키게 된다.
 +  * Hibernate 은 이 ''to-many'' 관계의 join fetch 에 대해 ''warning'' 로그를 남기지만 이것은 발견하기 매우 어렵다.
 +  * ''hibernate.query.fail_on_pagination_over_collection_fetch=true'' 설정을 하면 아예 exception 을 발생시키게 된다.
 +  * 항상 활성화하고 미리 에러를 잡는게 낫다.
 +
 +<code>
 +hibernate.query.fail_on_pagination_over_collection_fetch=true
 +</code>
java/hibernate/configuration.1593493973.txt.gz · 마지막으로 수정됨: 2020/06/30 14:12 저자 kwon37xi