[英]JOIN FETCH in spring-data-jpa does not fetch lazy associations
[英]Eclipselink fetch-join lazy associations of a subclass
我想获取一个仅在子类中存在的惰性关联。 在Hibernate中,例如可以使用fetch Treat联接
select a from A a left join fetch treat(a.parent as Child) u left join fetch child.some
其中child.some
是child.some
在于Child
实体上的关联。
但是我们使用Eclipselink 2.6.3。 AFAIK JPA不能解决此问题,Eclipse不支持fetch Treat。 我已经尝试过Eclipse提取提示,但没有成功。
提前致谢
默认情况下,EclipseLink不支持此功能(我相信这是一个错误)。 但是在Joiner库中有一种解决方法( https://github.com/encircled/Joiner中的 InheritanceJoiningCustomizer
)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.