@Mohamed,

Thx for your time, and patiance, as soon as i arive in my home i will
test it. It apear to be the solution to my problem.


[]'s

On 22 set, 10:20, Mohamed Meligy <[email protected]> wrote:
> @Fabio
> I think he means he needs to save the CatalogItem first in order to use the
> ID (clearly DB generated, probably identity) when saving the inherited
> object (saving, as INSERT in this context). Assuming one-to-one relationship
> I guess.
>
> @Stupied4ever,
> First of, I'm sorry to tell you that you are posting to the wrong group.
> Fluent mappings are best discussed (and more friendly answered) 
> athttp://groups.google.com/group/fluent-nhibernate
>
> However, this is one example coming from googling inheritance in
> FluentNHibernatehttp://marekblotny.blogspot.com/2009/03/fluent-nhibernate-and-inherit...
>
> Hope this helps.
>
> Regards,
>
> *Mohamed Meligy
> *Readify | Senior Developer
>
> M:*+61 451 835006begin_of_the_skype_highlighting              +61 451 
> 835006      end_of_the_skype_highlighting* | W:  www.readify.net
>
>  [image: Description: Description: Description: Description:
> rss_16]<http://gurustop.net/>
>  [image: Description: Description: Description: Description:
> cid:[email protected]]
> <http://www.linkedin.com/in/meligy>  [image:
> Description: Description: Description: Description:
> cid:[email protected]] <http://twitter.com/meligy>
>
> On Wed, Sep 22, 2010 at 10:48 PM, Fabio Maulo <[email protected]> wrote:
> > eh?
>
> > On Wed, Sep 22, 2010 at 9:19 AM, Stupied4ever <[email protected]>wrote:
>
> >> I need to save the catalogItem and after save the product, in this way
> >> one id or will be a product or a category.
>
> >> []'s
>
> >> On Sep 22, 7:58 am, Fabio Maulo <[email protected]> wrote:
> >> > which strategy you want use to represent the persistence of CatalogItem
> >> > hierarchy ?
>
> >> > On Tue, Sep 21, 2010 at 11:45 PM, Stupied4ever <[email protected]
> >> >wrote:
>
> >> > > Please somebody can help-me with this entities mapping ?? I am using
> >> > > Fluent, but i cant understand how to do cause i need to create 1st the
> >> > > Catalog item and after the product or the category.
>
> >> > > I have 3 tables, Product, Category and CatalogItem, and product and
> >> > > categories shares the CatalogItem ID.
>
> >> > >  public abstract class EntityBase
> >> > >  {
> >> > >        public virtual Int64 Id { get; protected set; }
> >> > >  }
>
> >> > > public class CatalogItem:EntityBase
> >> > > {
> >> > >        public virtual string DisplayName { get; set; }
> >> > >        public virtual double ListPrice { get; set; }
> >> > > }
>
> >> > > public class Product : CatalogItem
> >> > > {
> >> > >        public virtual int Quantity { get; set; }
> >> > >        public virtual int ExtraQuantity { get; set; }
> >> > > }
>
> >> > > public class Category:CatalogItem
> >> > > {
> >> > >      public virtual int CategoryName { get; set; }
> >> > > }
>
> >> > > --
> >> > > You received this message because you are subscribed to the Google
> >> Groups
> >> > > "nhusers" group.
> >> > > To post to this group, send email to [email protected].
> >> > > To unsubscribe from this group, send email to
> >> > > [email protected]<nhusers%[email protected]>
> >> <nhusers%[email protected]<nhusers%[email protected]>
>
> >> > > .
> >> > > For more options, visit this group at
> >> > >http://groups.google.com/group/nhusers?hl=en.
>
> >> > --
> >> > Fabio Maulo
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "nhusers" group.
> >> To post to this group, send email to [email protected].
> >> To unsubscribe from this group, send email to
> >> [email protected]<nhusers%[email protected]>
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/nhusers?hl=en.
>
> > --
> > Fabio Maulo
>
> >  --
> > You received this message because you are subscribed to the Google Groups
> > "nhusers" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<nhusers%[email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/nhusers?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" 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/nhusers?hl=en.

Reply via email to