hi. i wonder what i am missing. let's say i got a Customer and i add a CustomerPhone, when i try to use the CustomerPhone id right after the save it is 0. i really haven't had this problem before and i don't know what to search for on google. so i give it a shot here
public virtual void AddCustomerPhones(CustomerPhone customerPhone) { customerPhone.Customer = this; CustomerPhones.Add(customerPhone); } public CustomerMap() { Id(x => x.Id, "Id").GeneratedBy.Identity().WithUnsavedValue (default(int)); Map(x => x.Name); Map(x => x.CreateDate); Map(x => x.Active); Map(x => x.OrgNumber); Map(x => x.Email); Map(x => x.CGuid); HasMany<CustomerPhone>(x => x.CustomerPhones).IsInverse ().Cascade.All().LazyLoad(); } public CustomerPhoneMap() { Id(x => x.Id, "Id").GeneratedBy.Identity().WithUnsavedValue (default(int)); Map(x => x.Name); Map(x => x.Phone); References(x => x.Customer); } --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---