Can you achieve the same behaviour with Criteria? I have tried but no luck...
Cheers, Jarda On Sep 17, 8:50 am, "Wolfgang Trog" <[EMAIL PROTECTED]> wrote: > According to the doc: > > "Likewise, the special property class accesses the discriminator value of an > instance in the case of polymorphic > persistence. A Java class name embedded in the where clause will be > translated to its discriminator value. > > from Eg.Cat cat where cat.class = Eg.DomesticCat" > > so I would try: > > from Person p join p.Pets pet where pet.class = Dog > > -----Original Message----- > From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf > > Of Matt > Sent: Dienstag, 16. September 2008 17:13 > To: nhusers > Subject: [nhusers] Filter alias/relation based on concrete class > > Using NHibernate 2.0, how can I return all root Person entities that > have a dog, say for example I want to return all People that have a > Pet of type Dog, where Pets in a polymorphic IPet collection on a > Person. I have tried the NHibernate documentation but I can't find > how to handle this. I'm using a table per subclass (with joined- > subclass mapping to handle the Pet hierachy) so no discriminator value > explicitly exists. > > Thanks --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
