[英]Eclipselink fetch-join lazy associations of a subclass
I want to fetch a lazy association, which is present on a subclass only. 我想获取一个仅在子类中存在的惰性关联。 In Hibernate, it is possible to use fetch treat joins, for example
在Hibernate中,例如可以使用fetch Treat联接
select a from A a left join fetch treat(a.parent as Child) u left join fetch child.some
Where child.some
is an association which is present on Child
entity only. 其中
child.some
是child.some
在于Child
实体上的关联。
But we use Eclipselink ver 2.6.3.
但是我们使用Eclipselink 2.6.3。 AFAIK JPA doesn't cover this problem, fetch treat is not supported by Eclipse.
AFAIK JPA不能解决此问题,Eclipse不支持fetch Treat。 I have already tried eclipse fetch hints with no success.
我已经尝试过Eclipse提取提示,但没有成功。
Thanks in advance 提前致谢
This is not supported in EclipseLink by default (I believe it is a bug). 默认情况下,EclipseLink不支持此功能(我相信这是一个错误)。 But there is working workaround in Joiner library (
InheritanceJoiningCustomizer
in https://github.com/encircled/Joiner ) 但是在Joiner库中有一种解决方法( https://github.com/encircled/Joiner中的
InheritanceJoiningCustomizer
)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.