This question is locked. New answers and comments are not allowed.
Consider the following pseudo-model:
Document {
Id : int
Filename : String
Client : Client
}
Client {
Id: int
Name: String
City: String
}
The following ODATA query fails:
http://localhost:1880/EntitiesModel1Service.svc/DocumentSources?$format=json&$expand=Client&$inlinecount=allpages&$orderby=Client.City%20asc
The error is:
I've tried with various types of entities and sorting works fine on simple properties but as soon as I sort by navigation properties, it fails.
Could that be a bug in the Queryable implementation ? Or am I missing something ?
Document {
Id : int
Filename : String
Client : Client
}
Client {
Id: int
Name: String
City: String
}
The following ODATA query fails:
http://localhost:1880/EntitiesModel1Service.svc/DocumentSources?$format=json&$expand=Client&$inlinecount=allpages&$orderby=Client.City%20asc
The error is:
-
"The child type 'Client.City' in a cast was not an entity type. Casts can only be performed on entity types."
I've tried with various types of entities and sorting works fine on simple properties but as soon as I sort by navigation properties, it fails.
Could that be a bug in the Queryable implementation ? Or am I missing something ?