3 java annotations hibernate jpa
@Entity
class User {
@EmbeddedId
@AttributeOverride(name="firstName", column=@Column(name="fld_firstname")
UserId id;
Integer age;
}
@Embeddable
class UserId implements Serializable {
String firstName;
String lastName;
}
Run Code Online (Sandbox Code Playgroud)
我想知道AttributeOverride的用途是什么.这是来自hibernate在线文档的代码
| 归档时间: |
|
| 查看次数: |
12176 次 |
| 最近记录: |