Sorry for the late answer, I was busy in these days and I tried only
today, it works, thank you all!

On Dec 27 2010, 8:53 pm, "Richard Brown \(gmail\)"
<[email protected]> wrote:
> Agreed.  Full query might be:
>
> s.QueryOver<A>()
>     .JoinQueryOver(a => a.BList)
>         .Where(b => b.GetType() == typeof(B1))
>         .Where(b => (b as B1).Name == "b1")
>         .List();
>
>
>
>
>
>
>
> -----Original Message-----
> From: Fabio Maulo
> Sent: Monday, December 27, 2010 11:17 AM
> To: [email protected]
> Subject: Re: [nhusers] Re: Restrict polymorphic association with QueryOver
>
> to a specific type
>
> GetType() == typeof(xy)
> a is Xy
>
> --
> Fabio Maulo
>
> El 27/12/2010, a las 04:18, Stefano <[email protected]> escribi :
>
> > Yes, in hql I already did it, with Criteria there should be a way, in
> > QueryOver I didn't found it
>
> > On Dec 27, 3:56 am, Diego Mijelshon <[email protected]> wrote:
> >> I don't think it's possible (maybe it is, I can't say with 100%
> >> certainty).
>
> >> I can think of a way of doing it with HQL, though.
>
> >>     Diego
>
> >> On Sun, Dec 26, 2010 at 19:43, Stefano <[email protected]> wrote:
> >>> Hi all,
> >>> I have a class A that contains a polymorphic collection based of type
> >>> B, inherited by B1 and B2.
> >>> B1 has specific properties.
>
> >>> Is it possible with QueryOver to write a query on type A joined to the
> >>> collection, restricting it to a particular value of one of the
> >>> properties of B1?
>
> >>> --
> >>> 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.
>
> --
> 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 
> athttp://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