How to do join fetching instead of select fectching with EclipseLink?

前端 未结 1 431
孤独总比滥情好
孤独总比滥情好 2021-01-12 07:45

I\'ve got a OneToOne relation between two entities. This relation is eager by default, but when logging requests, I only see multiple selects, no jo

相关标签:
1条回答
  • 2021-01-12 08:14

    @JoinFetch

    or,

    @JoinFetch(JoinFetchType.OUTER)

    you can also use,

    @BatchFetch

    See, http://java-persistence-performance.blogspot.com/2010/08/batch-fetching-optimizing-object-graph.html

    You can also set both of these through Query hints instead of always having it enabled.

    0 讨论(0)
提交回复
热议问题