private AssociationType determineAssociationType(Class<?> entityClass, String path) { OuterJoinLoadable entityPersister = (OuterJoinLoadable) sessionFactory().getEntityPersister( entityClass.getName() ); int index = ( (UniqueKeyLoadable) entityPersister ).getPropertyIndex( path ); return (AssociationType) entityPersister.getSubclassPropertyType( index ); }
int n = persister.countSubclassProperties(); for ( int i = 0; i < n; i++ ) { Type type = persister.getSubclassPropertyType( i ); if ( type.isAssociationType() ) { walkEntityAssociationTree(
Type type = persister.getSubclassPropertyType(i); if ( type.isAssociationType() ) { walkEntityAssociationTree(
int n = persister.countSubclassProperties(); for ( int i = 0; i < n; i++ ) { Type type = persister.getSubclassPropertyType(i); if ( type.isAssociationType() ) { walkEntityAssociationTree(
int n = persister.countSubclassProperties(); for ( int i = 0; i < n; i++ ) { Type type = persister.getSubclassPropertyType(i); if ( type.isAssociationType() ) { walkEntityAssociationTree(
/** * Uniquely identifier a foreign key, so that we don't * join it more than once, and create circularities */ private static final class AssociationKey { private String[] columns; private String table; private AssociationKey(String[] columns, String table) { this.columns = columns; this.table = table; } public boolean equals(Object other) { AssociationKey that = (AssociationKey) other; return that.table.equals(table) && Arrays.equals(columns, that.columns); } public int hashCode() { return table.hashCode(); //TODO: inefficient } }