// getXXX(), isXXX(),都是對於 XXX 的操作
// 若沒有對到欄位都一定要加上 @Transient
@Transient
public String getAttributeA() {}
@Transient
public boolean isAttributeB() {}
// 其實 AttributeC 在 DB 中的 type 是 string
// 因此使用 @Type 來對應型別
// "yes_no" 是固定寫法,DB 會寫入 "Y" or "N"
@Type(type = "yes_no")
@Column(name = "STRING_ATTRIBUTE_C")
public boolean isAttributeC() {}
沒有留言:
張貼留言