Yep, original post with more details on the cause, as best I could tell: http://groups.google.com/group/fluent-nhibernate/browse_thread/thread/5624ee2958c4b802/0a21995747d340d3
2009/10/29 Hudson Akridge <[email protected]> > I believe this has already been reported as an issue. Sounds very familiar. > Not sure if it's been resolved yet. Might try doing some digging on here. I > know Paul had fixed something like this and just recently merged it into the > main upstream branch on Git. Have you tried grabbing the most recent build? > > > On Thu, Oct 29, 2009 at 4:44 PM, RikB <[email protected]> wrote: > >> >> We just upgraded to v1 RC and most of mode dose not map. I removed all >> of the inline JoinedSubclass structures that were working so well and >> replaced them with SubclassMap<T>. >> >> This is my issue; if my sub class is inheriting from an interface and >> an entity base class the SubclassMap does not work. Example: >> >> // The entity base is used by ALL objects in my model. >> public class Entity : IEntity //IEntity exposes the ID & Version >> { >> public Guid ID { get; set; } >> public in Version { get; set; } >> } >> >> public interface IContact : IEntity >> { >> string Name { get; set; } >> } >> >> public class Person : Entity, IContact >> { >> DateTime BornOn { get; set; } >> } >> >> >> Mappings that do not work! >> >> public class ContactMap : ClassMap<IContact> >> { >> public ContactMap() >> { >> ID(contact => contact.ID).GeneratedBy.GuidComb().Column >> ("ContactID"); >> Version(contact => contact.Version).Column >> ("ContactVersion"); >> Map(contact => contact.Name).Column("ContactName"); >> } >> } >> >> public class PersonMap : SubclassMap<IContact> >> { >> public PersonMap() >> { >> Map(contact => contact.BornOn).Column("ContactBornOn"); >> } >> } >> >> It would appear the Fluent NHibernate only evaluates the base class of >> Entity on the Person class and does not recognize that Person extends >> IContact. >> >> Can any shed light on this? >> >> >> > > > -- > - Hudson > http://www.bestguesstheory.com > http://twitter.com/HudsonAkridge > > > > > -- Regards, Robert Byrne, CTO, Iceberg www.geticeberg.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
