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.