开发者

JPA 2.0 / Hibernate custom join clause on association

I would like开发者_运维知识库 to associate 2 entities using hibernate or JPA 2.0 annotations with a custom join clause. The clause is not the usual FK/PK equality. In SQL this would be something like this:

join b on a.id = 1000 * b.a_id

is it possible to annotate such a custom join where clause and to ignore the default one

join b on a.id = b.a_id


Hibernate's @JoinFormula allows this. Look at this RFE for an example: https://hibernate.onjira.com/browse/HHH-5171?page=com.atlassian.jira.plugin.system.issuetabpanels%253Achangehistory-tabpanel

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜