1
是否可以將對象映射到數據庫中現有表的一部分?例如:是否可以將對象映射到現有表的一部分?
public class Account {
private Integer id;
private Integer accountNumber;
@Id
public Integer getId() {
return this.id;
}
@Column(nullable=false)
public Integer getAccountNumber() {
return this.accountNumber;
}
}
在數據庫(只針對問題的緣故):
Account
- id
- accountnumber
- lastmodified
- localbranchid