You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
문제
(warning)
JPA에서 모든 persistent 클래스들은 final이면 안되고(hibernate 기준으로 lazy loading 불가), 인자가 없는 생성자가 필수이다. 하지만 kotlin에서 data class는 기본적으로 final이다. 인자가 없는 생성자도 만들어야한다.
해결
build.gradle
플러그인을 사용해서 두 문제를 해결할 수 있다.
allopen
,noarg
플러그인을 사용하는 대신 두 플러그인을 포함하는org.jetbrains.kotlin.plugin.jpa
플러그인을 사용해도 좋다.References:
Beta Was this translation helpful? Give feedback.
All reactions