Код: Выделить всё
@OneToOne(mappedBy = "child1", fetch = FetchType.LAZY, optional = false)
private Child1 child1;
@OneToOne(mappedBy = "child2", fetch = FetchType.LAZY, optional = false)
private Child2 child2;
Код: Выделить всё
select
from parent p
join child1 c1
join child2 c2
order by
limit M offset N
Это приводит к исключению:
Код: Выделить всё
org.hibernate.query.SemanticException: Query specified join fetching, but the owner of the fetched association was not present in the select list [SqmSingularJoin(Parent(332551168492391).child1(332551168541736) : child1)]]
Код: Выделить всё
select count(*)
from parent p
join child1 c1
join child2 c2
order by
Итак, как лучше всего поступить отсюда? ?
Подробнее здесь: https://stackoverflow.com/questions/790 ... ng-fetches
Мобильная версия