Skip to content

Commit 45263c2

Browse files
committed
Fix naming/comment
1 parent 0f6a75f commit 45263c2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/JsonApiDotNetCore/Queries/Internal/QueryableBuilding/SelectClauseBuilder.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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();

0 commit comments

Comments
 (0)