I have a base class
Element and a subclass
Survey
In simple form they look like this :)
Element
{
Guid Id;
}
Survey : Element
{
String Title;
}
The Guid Id is represented as a string in the database using the [BsonRepresentation(BsonType.String)] attribute
When I save documents and return them all (FindAll) everything works fine and they are serialized and deserialized as expected.
But when I try to do the following it fails with the error "Unable to determine the serialization information for the expression: f.Id"
Collection<Survey>.AsQueryalble().Where(f=>f.Id == id)
But if I query only on the base class Element
Collection<Element>.AsQueryalble().Where(f=>f.Id == id) it works as expected.
I have no class maps created manually, and when I lookup the Survey class map the Id property seems to be mapped correctly with the string representation
Any idea?, I know there was a problem with inherited properties and querying, but that was a long time ago. Also before I changed the representation to string I had no problems.
--
Christian