Java's transient
keyword is used to denote that a field is not to be serialized, whereas JPA's @Transient
annotation is used to indicate that a field is not to be persisted in the database, i.e. their semantics are different.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…