Your mapping looks fine. How're you creating/saving your entities? On Wed, Feb 25, 2009 at 6:35 AM, jshaikh <jamir.sha...@gmail.com> wrote:
> > I am using nHibernate 2.0.1.4000, within S#arp architecture. My > following map file returns Type as NULL. This was working for me, > about a couple of days back, I have not made any changes to my > environments. When I looks back today after adding several other > database elements. I started getting NULL Type. I am able to get > Header information correctly. > > I would like to know, how to go about resolving this issue. Mapping > seems to be very sensitive and any slight change causing everything > else to fail apart. Any advice ??? > > Thank you very much for help. > Jamir > > Line Map: > > public class LineMap : ClassMap<Line>, IMapGenerator > { > public LineMap() { > WithTable("Lines"); > > Id(x => x.ID, "LineID") > .WithUnsavedValue(0) > .GeneratedBy.Identity(); > > References(x => x.Header, "HeaderID"); > Map(x => x.Status); > References(x => x.Type, "TypeID"); > Map(x => x.Comments); > ...... > > } > > #region IMapGenerator Members > > public System.Xml.XmlDocument Generate() { > return CreateMapping(new MappingVisitor()); > } > > #endregion > } > > > My Type Map: > public class TypeMap : ClassMap<Type>, IMapGenerator > { > public TypeMap() { > WithTable("Types"); > > Id(x => x.ID, "TypeID") > .WithUnsavedValue(0) > .GeneratedBy.Identity(); > > Map(x => x.Type); > Map(x => x.ShortDesc); > } > > #region IMapGenerator Members > > public System.Xml.XmlDocument Generate() { > return CreateMapping(new MappingVisitor()); > } > > #endregion > } > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To post to this group, send email to fluent-nhibernate@googlegroups.com To unsubscribe from this group, send email to fluent-nhibernate+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/fluent-nhibernate?hl=en -~----------~----~----~----~------~----~------~--~---