如何将另一个表中的列中的单个值映射到当前对象?
例子:
class Foo {
@Id
@Column(name="FOO_ID")
private String fooId;
@Column(name="FOO_A")
private String fooA;
//Column to map to another table?
//is a one to one mapping - but don't want a separate object for this.
private String barCode;
}
桌子:Fields
福:FOO_ID, FOO_A
酒吧:FOO_ID, BAR_CODE
如何在BAR_CODE
不使用创建单独对象(或辅助表)的情况下检索字段JPA annotations
?