I have TPH inheritance. In OnModelCreating I specify mapping like this:
modelBuilder.Entity<Parent>()
.Map<Child1>(m=>m.Requires("TypeCode").HasValue("A"))
.Map<Child2>(m=>m.Requires("TypeCode").HasValue("B"))
...
However when I try to run the query
Parents.OfType<Child1>()
I get an error 'Invalid column discriminator'. When debugging I can see it runs the code in OnModelCreating... It seems like EF is ignoring Map definitions?