W was trying to fetch join over three levels:
JOIN FETCH entity1.collection1.collection2 // two OneToMany relations
but got:
org.hibernate.HibernateException: Errors in named queries: [...]
Is it because it was too deep, or because a collection of collections cannot be fetched this way? My max fetch depth is 3, if this is relevant.
I can, at the same time, do a triple JOIN FETCH starting from the other side:
JOIN FETCH entity3.entity2.entity1 // two ManyToOne relations
Somehow I cannot find anything in JPA specification, or in Hibernate docs, that would limit the depth of this clause.