I have a RavenDB query using index and I need to add condition checking nested objects type (these objects aren't separate documents)
entries = session.Query<result, index>()
/* some conditions here */
.Where(x => x.Messages.Any(m => m.GetType() == typeof(MyMessage)))
.ToList();
Raven tells me, that he doesn't know how to translate GetType. So how can I achieve this?