Skip to content

Customized entity set with customized entity type will fail during query #460

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

Closed
chinadragon0515 opened this issue Jul 6, 2016 · 1 comment
Milestone

Comments

@chinadragon0515
Copy link
Contributor

chinadragon0515 commented Jul 6, 2016

In Api class, defined a customized entity set with customized entity type and use model extend to add the customized entity type, the query will fail.


message: "Element type cannot be found for 'PeopleWithAge'.",
type: "System.NotSupportedException",
stacktrace: "   at Microsoft.Restier.Core.ApiContextExtensions.EnsureElementType(ApiContext context, String namespaceName, String name) in D:\dev\githome\RESTier.vin\src\Microsoft.Restier.Core\ApiContextExtensions.cs:line 542
   at Microsoft.Restier.Core.ApiContextExtensions.SourceCore(ApiContext context, String namespaceName, String name, Object[] arguments) in D:\dev\githome\RESTier.vin\src\Microsoft.Restier.Core\ApiContextExtensions.cs:line 480
   at Microsoft.Restier.Core.ApiContextExtensions.GetQueryableSource(ApiContext context, String name, Object[] arguments) in D:\dev\githome\RESTier.vin\src\Microsoft.Restier.Core\ApiContextExtensions.cs:line 260
   at Microsoft.Restier.Core.ApiBaseExtensions.GetQueryableSource(ApiBase api, String name, Object[] arguments) in D:\dev\githome\RESTier.vin\src\Microsoft.Restier.Core\ApiBaseExtensions.cs:line 84
   at Microsoft.Restier.Publishers.OData.Query.RestierQueryBuilder.HandleEntitySetPathSegment(ODataPathSegment segment) in D:\dev\githome\RESTier.vin\src\Microsoft.Restier.Publishers.OData\Query\RestierQueryBuilder.cs:line 184
   at Microsoft.Restier.Publishers.OData.Query.RestierQueryBuilder.BuildQuery() in D:\dev\githome\RESTier.vin\src\Microsoft.Restier.Publishers.OData\Query\RestierQueryBuilder.cs:line 74
   at Microsoft.Restier.Publishers.OData.RestierController.GetQuery(ODataPath path) in D:\dev\githome\RESTier.vin\src\Microsoft.Restier.Publishers.OData\RestierController.cs:line 497
   at Microsoft.Restier.Publishers.OData.RestierController.<Get>d__7.MoveNext() in D:\dev\githome\RESTier.vin\src\Microsoft.Restier.Publishers.OData\RestierController.cs:line 83
@chinadragon0515
Copy link
Contributor Author

fix merged with PR #461 ,close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant