-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added logic to allow query options in select=* calls #971
base: release-8.x
Are you sure you want to change the base?
Conversation
…nd requests to http://localhost:64771/v1/Customers?$select=FavoriteAddresses($count=true) and http://localhost:64771/v1/Customers?$select=FavoriteAddresses($count=true),*
@@ -443,6 +443,22 @@ await WriteDynamicComplexPropertyAsync(dynamicTypeProperties[property], property | |||
ResourceContext resourceContext = new ResourceContext(writeContext, structuredType, graph); | |||
|
|||
SelectExpandNode selectExpandNode = CreateSelectExpandNode(resourceContext); | |||
/*if (expectedType.Definition.FullTypeName() == "ODataRoutingSample.Models.Customer") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please delete unused code, you can always retrieve it from Git.
{ | ||
//// TODO this doesn't handle cases like $select=*,path/to/definedpropery | ||
//// TODO the defined property gets added twice, but it shouldn't be; webapi could differentiate these cases by looking for '$', but really ODL should have "subsumed" items, and "non-subsumed" items to differentaite bewten the cases | ||
foreach (var subsumedSelectItem in wildcardSelectItem.SubsumedSelectItems.Cast<PathSelectItem>().Where(item => item.HasOptions)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var subsumedSelectItems = wildcardSelectItem.SubsumedSelectItems.Cast().Where(item => item.HasOptions);
foreach (var subsumedSelectItem in subsumedSelectItems)
@@ -517,6 +521,21 @@ internal Expression ProjectElement(QueryBinderContext context, Expression source | |||
continue; | |||
} | |||
|
|||
var wildcardSelectItem = selectItem as WildcardSelectItem; | |||
if (wildcardSelectItem != null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add tests for this senario
No description provided.