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
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.
But we use ver 2.6.3. 2.6.3。 AFAIK JPA doesn't cover this problem, fetch treat is not supported by Eclipse. I have already tried eclipse fetch hints with no success.
Thanks in advance
This is not supported in EclipseLink by default (I believe it is a bug). But there is working workaround in Joiner library ( InheritanceJoiningCustomizer
in https://github.com/encircled/Joiner )
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.