/// <summary> /// /// </summary> /// <param name="q"></param> public virtual void End( QueryTranslator q ) { ignoreInitialJoin = false; IType propertyType = PropertyType; if( propertyType != null && propertyType.IsPersistentCollectionType ) { collectionRole = ( ( PersistentCollectionType ) propertyType ).Role; collectionName = q.CreateNameForCollection( collectionRole ); PrepareForIndex( q ); } else { columns = CurrentColumns( ); SetType( q ); } //important!! continuation = false; }
private void DereferenceCollection(String propertyName, String role, QueryTranslator q) { collectionRole = role; IQueryableCollection collPersister = q.GetCollectionPersister( role ); string[] colNames = collPersister.KeyColumnNames; string name = q.CreateNameForCollection(role); AddJoin( collPersister.TableName, name, colNames ); if ( collPersister.HasWhere ) { join.AddCondition( collPersister.GetSQLWhereString( name ) ); } collectionName = name; collectionOwnerName = currentName; currentName = name; currentProperty = propertyName; componentPath = null; //componentPath = new StringBuilder(); currentPropertyMapping = new CollectionPropertyMapping( collPersister ); }