walkCollectionTree( (QueryableCollection) joinable, subalias,
/** * For a collection role, return a list of associations to be fetched by outerjoin */ private final List walkCollectionTree( final QueryableCollection persister, final String alias, final List associations, final Set visitedAssociations, final String path, final int currentDepth) throws MappingException { if ( persister.isOneToMany() ) { walkEntityTree( (OuterJoinLoadable) persister.getElementPersister(), alias, associations, visitedAssociations, path, currentDepth ); } else { Type type = persister.getElementType(); if ( type.isAssociationType() ) { // a many-to-many; // decrement currentDepth here to allow join across the association table // without exceeding MAX_FETCH_DEPTH (i.e. the "currentDepth - 1" bit) AssociationType associationType = (AssociationType) type; String[] aliasedLhsColumns = persister.getElementColumnNames(alias);