In ORM the driscriminator is only a column and not part of your domain-model
To have "IsInstanceOf(A)"
from A

To have "IsInstanceOf(B)"
from B

To have "typeof(A)"
from A a where a.class = A

To have "typeof(B)"
from B b where b.class = B

On Wed, Jul 14, 2010 at 5:30 PM, Eduardo Costa <[email protected]> wrote:

> I used all, but the discritinator works if i set discriminator value
> for all child classes, but when i getting the parent class i need get
> child too.
>
> Registers A
>
> 1
> 2
> 3
>
> Registers B
>
> 4
> 5
>
>
> get B result 4,5
> get A result 1,2,3,4,5
>
>
>
> On 14 jul, 15:00, José F. Romaniello <[email protected]> wrote:
> > use nhibernate;
> >
> > http://www.nhforge.org/doc/nh/en/index.html#inheritance
> >
> > BTW; you will never need a property or field for the discriminator.
> > <http://www.nhforge.org/doc/nh/en/index.html#inheritance>
> >
> > 2010/7/14 Eduardo Costa <[email protected]>
> >
> > > Hi,
> >
> > > I have this problem.
> >
> > > Class A
> > > {
> > >  string Discriminator;
> > > }
> >
> > > Class B inherits A
> > > {
> > > }
> >
> > > I need when I get a list of Class A find A plus B and when I get a
> > > list of Class B find only B based in discriminator property
> >
> > > --
> > > 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.
>
> --
> 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].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to