OneToOne hibernate只获得连接的结果

时间:2017-12-19 12:55:25

标签: hibernate jpa spring-data

是否可以仅获得OneToOne加入的结果?

例如:

地址(身份证,国家,街道......) 国家(身份证,标签)

我想创建一个直接获取国家标签的DAO:

public class Address {
    @Id
    private Long id;

    // Some annotation to join with country and get the label 
    private countryLabel;

    @Column(name = "street")
    private String street;
}

感谢您的帮助!

0 个答案:

没有答案