final String[] columns = origin.toColumns( originTableAlias, attributeName, false );
final String tableAlias = walker.getAliasGenerator().createName(
entityType.getAssociatedEntityName() );
final FromElementFactory fromElementFactory = new FromElementFactory( fromClause, origin,
attributeName, classAlias, columns, false);
final JoinSequence joinSequence = walker.getSessionFactoryHelper().createJoinSequence(
false, entityType, tableAlias, JoinType.LEFT_OUTER_JOIN, columns );
fromElement = fromElementFactory.createEntityJoin(
entityType.getAssociatedEntityName(),
tableAlias,
joinSequence,
true,
walker.isInFrom(),
entityType,
role,
null
);
}
else if ( propertyType.isCollectionType() ) {
final String[] columns = origin.toColumns( originTableAlias, attributeName, false );
final FromElementFactory fromElementFactory = new FromElementFactory( fromClause, origin,
attributeName, classAlias, columns, false);
final QueryableCollection queryableCollection = walker.getSessionFactoryHelper()
.requireQueryableCollection( role );
fromElement = fromElementFactory.createCollection(
queryableCollection, role, JoinType.LEFT_OUTER_JOIN, true, false ) ;
}
}
if (fromElement != null) {