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
精彩评论