1
我使用 “OneToOne” 有两个表的Hibernate使用OneToOne
tab1 { col1 (PK), col2, col3 }
tab2 { col1, col2(PK), col3 }
我使用Hibernate的注解加盟
我有下面的Hibernate类TAB1
class tab1 {
@OneToOne
@JoinColumn(name = "col2", referencedColumnName = "col1")
private tab2 t2;
}
我期待运行以下sql
select * from tab1 t1, tab2 t2 where t1.col1 = t2.col2
但它不工作,我expected.Please帮助