File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/JsonApiDotNetCore/Queries/Internal/QueryableBuilding Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -136,10 +136,10 @@ private ICollection<PropertySelector> ToPropertySelectors(FieldSelectors fieldSe
136136
137137 if ( fieldSelectors . ContainsReadOnlyAttribute || fieldSelectors . ContainsOnlyRelationships )
138138 {
139- // If a read-only attribute is selected, its calculated value likely depends on another property, so select all properties.
140- // And only selecting relationships implicitly means to select all attributes too .
139+ // If a read-only attribute is selected, its calculated value likely depends on another property, so fetch all scalar properties.
140+ // And only selecting relationships implicitly means to fetch all scalar properties as well .
141141
142- IncludeAllAttributes ( elementType , propertySelectors ) ;
142+ IncludeAllScalarProperties ( elementType , propertySelectors ) ;
143143 }
144144
145145 IncludeFields ( fieldSelectors , propertySelectors ) ;
@@ -148,7 +148,7 @@ private ICollection<PropertySelector> ToPropertySelectors(FieldSelectors fieldSe
148148 return propertySelectors . Values ;
149149 }
150150
151- private void IncludeAllAttributes ( Type elementType , Dictionary < PropertyInfo , PropertySelector > propertySelectors )
151+ private void IncludeAllScalarProperties ( Type elementType , Dictionary < PropertyInfo , PropertySelector > propertySelectors )
152152 {
153153 IEntityType entityModel = _entityModel . GetEntityTypes ( ) . Single ( type => type . ClrType == elementType ) ;
154154 IEnumerable < IProperty > entityProperties = entityModel . GetProperties ( ) . Where ( property => ! property . IsShadowProperty ( ) ) . ToArray ( ) ;
You can’t perform that action at this time.
0 commit comments