// Untested...
ICriteria criteria = Session.CreateCriteria(typeof(SummerParty));
criteria.Add(Expression.Eq("Party.class", typeof
(Company));
return criteria.List<SummerParty>();
On Jul 22, 11:47 am, Stephane EHRET <[email protected]> wrote:
> Hi,
>
> In one of his post, Ayende Rahien talks about
> inheritance:http://ayende.com/Blog/archive/2009/04/10/nhibernate-mapping-ndash-in....
>
> Let's imagine I have an entity SummerParty with the following
> association:
> <many-to-one name="Party" class="Party" column="PartyId" not-
> null="false"/>
>
> How do I query a list of SummerParty that contains only Company
> parties?
> Is there any way to get somehow a navigation like
> SummerParty.CompanyParties?
>
> Thanks for your help,
> Stephane
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---