JPA

[QueryDSL] Hibernate 6 이후 Custom Function 설정

dev_minpark 2024. 7. 15. 18:39

 

Hibernate 6 버전 이상에서 커스텀 펑션을 등록할 때 기존 Dialect Custom Function 설정법이 Deprecated 됨

Hibernate 6미만 버전 설정 시
META-INF > services 디렉터리 생성 및 org.hibernate.boot.model.FunctionContributor 파일 생성
FunctionContributor 파일에 Custom Function 경로 지정

 

CustomFunction 생성

 

등록된 Function 의 name 값으로 호출

 

'JPA' 카테고리의 다른 글

[JPA] 영속성 전이 (CASCADE)  (0) 2024.07.25
[JPA] @EntityListener  (0) 2024.07.11