I've tried a similar case and get the same error while in Entity Framework exactly the same query runs fine. So I think you're running into a bug here (or an "unsupported feature") and you may have to work around it. You could do that by turning the query around:
var relationQry =
from relation in anchor.Relations
where anchorIDs.Contains(relation.AnchorIDTo)
|| anchorIDs.Contains(relation.AnchorIDFrom)
select new
{
relationID = relation.RelationID,
anchorIDFrom = relation.AnchorIDFrom,
anchorIDTo = relation.AnchorIDTo,
relationTypes = from type in relation.RelationTypes
select type.RelationType1
};
By the way: you can change the "stupid names" :) by selecting the association in the designer and the names of its child property.