-
Notifications
You must be signed in to change notification settings - Fork 351
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
ODataException: To compute an entity's metadata, its key and concurrency-token property values must be provided #2098
Comments
I think autoexpand will end up being key to this issue. Because it's autoexpand, we will try and generate the nav link for which we need key values. I suspect this may be related to a recent change where we were silently swallowing exceptions when trying to determine key values. |
HI @akshukla25 It will be great if you can please share the stack trace for the exception |
@Sreejithpin, Stacktrace: |
@akshukla25 Thanks , Also looks like you are using 7.7.3 version of the library. Can you please confirm |
Yes, mentioned assembly version in the description section. |
@akshukla25 Thanks. Can you please share a repro with model and the request you are trying (if there is any other than given in the description) |
The request I am trying is GET ~/authorizationPolicy/authorizationPolicy?api-version=AGSbetaB-internal&$select=displayName, I can see this issue for RoleDefinitions as well: GET ~/roleDefinitions/?api-version=AGSbetaB-internal&$select=id,inheritsPermissionsFrom |
@akshukla25 Thanks, Can you please share your model. Also will be great if you can please share a small repro as well which we can use to debug to get the issue |
This is a duplicate reported in #1149 |
@Sreejithpin is there any update on this issue? |
@mikepizzo, @Sreejithpin this issue is a blocker for us, could you please help? |
Has anyone found a workaround? |
您好,我已收到您的邮件,并会尽快回复。This is an automatic reply, confirming that your e-mail was received.Thank you
|
I have the same issue, any workaround? |
I have the same issue with an entity using auto-expand and it seems that the $select without the 'id' field results in this error. If 'id' field is added to the field list, then the results are returned correctly. I am using version 8.0.8. |
您好,我已收到您的邮件,并会尽快回复。This is an automatic reply, confirming that your e-mail was received.Thank you
|
…adata, its key and concurrency-token property values must be provided
…adata, its key and concurrency-token property values must be provided (#2552) * issue #2098: fix the issue ODataException: To compute an entity's metadata, its key and concurrency-token property values must be provided * Address the comments * fix the issue: change the test condition for complex * if the containment within complex property, we should reuse the existing odata path
Entities having auto expand property is throwing an exception "ODataException: To compute an entity's metadata, its key and concurrency-token property values must be provided" when using $select=prop1.
Assemblies affected
Microsoft.OData.Core 7.7.3.0
Reproduce steps
This is an issue where entities have auto expand property enabled. So, even if we are requesting another property like displayName, it throws an exception below while writing the response using writeNestedResourceInfo(nestedResourceInfo).
GET ~/authorizationPolicy/authorizationPolicy?api-version=AGSbetaB-internal&$select=displayName
If id is also selected, we don't see this exception then.
Example : GET ~/authorizationPolicy/authorizationPolicy?api-version=AGSbetaB-internal&$select=id, displayName
Expected result
Retrieve the displayName of the object requested.
Actual result
Microsoft.ODataException: "The entity instance value of type 'Microsoft.DirectoryServices.AuthorizationPolicy' doesn't have a value for property 'id'. To compute an entity's metadata, its key and concurrency-token property values must be provided."
The text was updated successfully, but these errors were encountered: