I have a very simple scenario, using NHibernate:
- one abstract base class “animal”;
- two concrete subclass “cat” and “dog” with discriminator column (1 for dog and 2 for cat);
- one normal class Person;
Person have a many-to-one of animal.
I want retrieve a list of person with a dog.
How can I do this?
thx a lot
If I understand well, something like this :
above is “Criteria API” but you can use “HQL” it’s more something like this :
HTH