문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 양쪽 이전 판 이전 판 다음 판 | 이전 판 | ||
|
java:hibernate:usertype [2014/10/07 13:18] kwon37xi |
java:hibernate:usertype [2018/10/24 10:26] (현재) kwon37xi |
||
|---|---|---|---|
| 줄 1: | 줄 1: | ||
| ====== Hibernate User Type ====== | ====== Hibernate User Type ====== | ||
| * '' | * '' | ||
| + | * [[https:// | ||
| * [[java: | * [[java: | ||
| * [[java: | * [[java: | ||
| + | * [[java: | ||
| + | * UserType의 '' | ||
| + | * **'' | ||
| + | * 이 경우 굳이 UserType의 '' | ||
| + | * [[https:// | ||
| ===== UserType의 등록 ===== | ===== UserType의 등록 ===== | ||
| 줄 28: | 줄 34: | ||
| 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 ===== | ||
| * Primary Key(Identifier)나 | * Primary Key(Identifier)나 | ||
| + | |||
| + | ===== java.time.Year, | ||
| + | * [[https:// | ||
| + | * 기본적으로는 JPA '' | ||
| + | * Hibernate 사용시에는 '' | ||
| + | |||
| + | ===== 참고 ===== | ||
| + | * [[https:// | ||