i am sorry but what you mean with "not persisting it into DB " in this
case?

On 11 Sep, 15:24, Tuna Toksoz <tehl...@gmail.com> wrote:
> You're not persisting it into DB
>
> Tuna Toksöz
> Eternal sunshine of the open source mind.
>
> http://devlicio.us/blogs/tuna_toksozhttp://tunatoksoz.comhttp://twitter.com/tehlike
>
> On Fri, Sep 11, 2009 at 9:23 AM, Topflysecurity 
> <konnektgra...@gmail.com>wrote:
>
>
>
> > 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to