@@ -45,7 +45,6 @@ public partial class QueryLoader : BasicLoader
45
45
private int _selectLength ;
46
46
private LockMode [ ] _defaultLockModes ;
47
47
private ISet < ICollectionPersister > _uncacheableCollectionPersisters ;
48
- private Dictionary < string , string [ ] > [ ] _collectionUserProvidedAliases ;
49
48
private IReadOnlyDictionary < int , int > _entityByResultTypeDic ;
50
49
51
50
public QueryLoader ( QueryTranslatorImpl queryTranslator , ISessionFactoryImplementor factory , SelectClause selectClause )
@@ -204,11 +203,6 @@ protected internal override ICollectionPersister[] CollectionPersisters
204
203
get { return _collectionPersisters ; }
205
204
}
206
205
207
- protected override IDictionary < string , string [ ] > GetCollectionUserProvidedAlias ( int index )
208
- {
209
- return _collectionUserProvidedAliases ? [ index ] ;
210
- }
211
-
212
206
private void Initialize ( SelectClause selectClause )
213
207
{
214
208
IList < FromElement > fromElementList = selectClause . FromElementsForLoad ;
@@ -229,8 +223,6 @@ private void Initialize(SelectClause selectClause)
229
223
_collectionPersisters = new IQueryableCollection [ length ] ;
230
224
_collectionOwners = new int [ length ] ;
231
225
_collectionSuffixes = new string [ length ] ;
232
- if ( collectionFromElements . Any ( qc => qc . QueryableCollection . IsManyToMany ) )
233
- _collectionUserProvidedAliases = new Dictionary < string , string [ ] > [ length ] ;
234
226
235
227
for ( int i = 0 ; i < length ; i ++ )
236
228
{
@@ -280,24 +272,6 @@ private void Initialize(SelectClause selectClause)
280
272
_selectLength ++ ;
281
273
}
282
274
283
- if ( collectionFromElements != null && element . IsFetch && element . QueryableCollection ? . IsManyToMany == true
284
- && element . QueryableCollection . IsManyToManyFiltered ( _queryTranslator . EnabledFilters ) )
285
- {
286
- var collectionIndex = collectionFromElements . IndexOf ( element ) ;
287
-
288
- if ( collectionIndex >= 0 )
289
- {
290
- // When many-to-many is filtered we need to populate collection from element persister and not from bridge table.
291
- // As bridge table will contain not-null values for filtered elements
292
- // So do alias substitution for collection persister with element persister
293
- // See test TestFilteredLinqQuery for details
294
- _collectionUserProvidedAliases [ collectionIndex ] = new Dictionary < string , string [ ] >
295
- {
296
- { CollectionPersister . PropElement , _entityPersisters [ i ] . GetIdentifierAliases ( Suffixes [ i ] ) }
297
- } ;
298
- }
299
- }
300
-
301
275
_owners [ i ] = - 1 ; //by default
302
276
if ( element . IsFetch )
303
277
{
0 commit comments