columnDefinition = “datetime(6)”
).<property name="jadira.usertype.autoRegisterUserTypes" value="true" /> 1 <property name="jadira.usertype.databaseZone" value="jvm" />
nullable=false
일때 오류 발생하는 버그 있음. 5.4에서 해결된 듯.@Column @CreationTimestamp private LocalDateTime createDateTime; @Column @UpdateTimestamp private LocalDateTime updateDateTime;
@Generated(GenerationTime.INSERT) @Column private LocalDateTime createDateTime; @Generated(GenerationTime.ALWAYS) @Column private LocalDateTime updateDateTime;
created_at DATETIME(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), modified_at DATETIME(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
insertable=false, updatable=false
설정을 해준다.YearMonth
, Year
, Month
는 AttributeConverter
만들어야 함.