Replies: 1 comment 2 replies
-
|
I read a bit more on this after asking the question and found out about the http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part2-url-conventions.html
I tried:
But it returns an error: {
"error": {
"code": "",
"message": "Could not find a property named 'UserName' on type 'Trippin.Trip'."
}
}I've not yet tried locally, will update this once I do. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Say I have a
QueryCategoryentity which has manyQueryentities (1-to-many classic parent-child relationship).Now, I want to get all category information, but I only want to expand the queries for a specific category. This would be a sample response:
[{ "name": "Category1", "queries": [] }, { "name": "Category2", "queries": [{ "id": 1, "queryName": "Some Query", "category": "Category2" }, { "id": 2, "queryName": "Another Query", "category": "Category2" } ] }, { "name": "Category3", "queries": [] } ]Notice how categories 1 and 3 are present, but their
queriesproperty is not expanded (its empty). Category 2 hasqueriesexpanded.Is this a supported scenario in the OData protocol and .NET implementation using a single request? Can one expand a property on just some of the returned entities?
Beta Was this translation helpful? Give feedback.
All reactions