public override void PrepareForDot(string propertyName) { FromElement fromElement = FromElement; if (fromElement == null) { throw new InvalidOperationException("No FROM element for index operator!"); } IQueryableCollection queryableCollection = fromElement.QueryableCollection; if (queryableCollection != null && !queryableCollection.IsOneToMany) { FromReferenceNode collectionNode = ( FromReferenceNode )GetChild(0); String path = collectionNode.Path + "[]." + propertyName; if (Log.IsDebugEnabled) { Log.Debug("Creating join for many-to-many elements for " + path); } FromElementFactory factory = new FromElementFactory(fromElement.FromClause, fromElement, path); // This will add the new from element to the origin. FromElement elementJoin = factory.CreateElementJoin(queryableCollection); FromElement = elementJoin; } }
public override void PrepareForDot(string propertyName) { FromElement fromElement = FromElement; if ( fromElement == null ) { throw new InvalidOperationException( "No FROM element for index operator!" ); } IQueryableCollection queryableCollection = fromElement.QueryableCollection; if ( queryableCollection != null && !queryableCollection.IsOneToMany) { FromReferenceNode collectionNode = ( FromReferenceNode ) GetChild(0); String path = collectionNode.Path + "[]." + propertyName; if (Log.IsDebugEnabled) { Log.Debug( "Creating join for many-to-many elements for " + path ); } FromElementFactory factory = new FromElementFactory( fromElement.FromClause, fromElement, path ); // This will add the new from element to the origin. FromElement elementJoin = factory.CreateElementJoin( queryableCollection ); FromElement = elementJoin; } }