开发者

Hibernate xml -> annonations described by formula

Is there any possibility to map following xml into annotations?

<one-to-one
 name="proper开发者_StackOverflow中文版ty"
 class="org.my.app.TargetObject">
 <formula>APP_ID</formula>
 <formula>'Yes'</formula>
</one-to-one>


Newer versions of Hibernate have @JoinColumnOrFormula. So you could probably map it similar to this:

@OneToOne
@JoinColumnsOrFormulas({
  @JoinFormula("APP_ID"),
  @JoinFormula("YES")
})
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜