This can't be a compilation error because the argument to CustomType is an instance of System.Type. The compiler has no idea what type that System.Type corresponds to. It should also be noted that the generic version of CustomType is also no better in this regard, because we specify no relationship between the generic argument and the type of the member you pointed to with your lambda expression.
On Fri, Oct 23, 2009 at 8:02 AM, Jamie Ide <[email protected]> wrote: > > Why doesn't this mapping error cause compilation to fail? > > Map(x => x.NewFuelType).CustomType(typeof > (DhwFuelSwitch.EquipmentType)); > Map(x => x.NewEquipmentType).CustomType(typeof > (DhwFuelSwitch.EquipmentType)); > > NewFuelType is typed as FuelType not EquipmentType so I would expect a > type mismatch exception. The error manifested itself by causing the > object to be dirty immediately after a Get. It looks obvious with the > map statements together but it took me a while to find. Adding > DynamicUpdate to the map file was a tremendous debugging tool because > I could easily spot what had changed. > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/fluent-nhibernate?hl=en -~----------~----~----~----~------~----~------~--~---
