EclipseLink与Hibernate的@NotFound批注等效吗?

时间:2018-11-28 05:06:30

标签: hibernate jpa associations eclipselink model-associations

在我的旧数据库中,某些字段映射为其他表的PK,而没有FK信息,并且定义为不可为空。

class SomeChild {

    private long parentId; // No FK, 0 for none.
}

我想我可以使用休眠状态

class SomeChild {

    @NotFound(action=NotFoundAction.IGNORE)
    @ManyToOne
    private Parent parent;
}

我该如何使用EclipseLink?

0 个答案:

没有答案
相关问题