What causes the error :
Property "PropName" does not refer to a known property in type"XData.Default.XXX" ?
I have a hierarchy of aurelius entities, each with a list of other entities.
When I use a browser to access the server, everything seems to make sense, with the appropriate proxies etc.
Is there any easy way to debug this ?
I've found the problem.
I have some entities which are inherited from a base entity.
In order for the XDataClient to correctly create the entities, it must receive a property with the type "@xdata.type".
When I use the browser to look at the Xdata json, it is correct if I access individual entities. If however I create a header item "XData-ExpandLevel=10" which XDataClient does itself, the XDataServer does not return the "@xdata.type" properties resulting in the wrong class being instansiated.
I have fixed my problem by setting the "SerializeInstanceType" property of the XDataServer component to "Always". The default value is "IfNeeded".
Not sure if this is a bug, because in the case of my entities it is "needed" but XDataServer was not providing the property.
That looks indeed a bug in the IfNeeded option when it comes to lists that contain heterogeneous objects (from an inheritance hierarchy).
For now using the "Always" option is the workaround. We are investigating to see how to fix it for a future version.