Walking depth-first can lead to cases where we inadvertently skip join fetching associations because we have already processed the "same" AssociationKey relative to a separate path branch.
See `org.hibernate.orm.test.sql.exec.onetoone.bidirectional.EntityWithBidirectionalOneToOneTest#testGetMother` , `#testGetAdoptedChild` and `#testHqlSelectMother` for examples. These fail after the changes for https://hibernate.atlassian.net/browse/HHH-14398 because we now walk the attributes in a different order. Previously it just "happened" to work.
One real solution would be to walk the fetchables width first. I.e....
The point being to give higher precedence to the paths "closer" to the root