문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 다음 판 | 이전 판 마지막 판 양쪽 다음 판 | ||
java:hibernate:usertype [2014/10/02 16:41] kwon37xi |
java:hibernate:usertype [2018/10/24 10:19] kwon37xi |
||
---|---|---|---|
줄 3: | 줄 3: | ||
* [[java: | * [[java: | ||
* [[java: | * [[java: | ||
+ | * [[java: | ||
+ | * UserType의 '' | ||
+ | * **'' | ||
+ | * 이 경우 굳이 UserType의 '' | ||
+ | * [[https:// | ||
===== UserType의 등록 ===== | ===== UserType의 등록 ===== | ||
줄 28: | 줄 33: | ||
import org.hibernate.annotations.TypeDef; | import org.hibernate.annotations.TypeDef; | ||
import org.hibernate.annotations.TypeDefs; | import org.hibernate.annotations.TypeDefs; | ||
+ | </ | ||
+ | // Entity class | ||
// 이제 엔티티 클래스에서는 다음과 같이 간단히 등록 가능 | // 이제 엔티티 클래스에서는 다음과 같이 간단히 등록 가능 | ||
@Type(type = " | @Type(type = " | ||
@Column(name = " | @Column(name = " | ||
private SomeEnum someEnum; | private SomeEnum someEnum; | ||
+ | |||
</ | </ | ||
+ | |||
+ | ===== Primary Key ===== | ||
+ | * Primary Key(Identifier)나 | ||
+ | |||
+ | ===== java.time.Year, | ||
+ | * [[https:// | ||
+ | * 기본적으로는 JPA '' | ||
+ | * Hibernate 사용시에는 '' | ||
+ | |||
+ | ===== 참고 ===== | ||
+ | * [[https:// | ||
+ |