簡體   English   中英

Eclipselink的子類的fetch-join惰性關聯

[英]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.somechild.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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM