Say we've got an abstract @Entity Animal, and several entity classes that extend Animal, including Dog, Cat, Monkey and Bat.
How can I filter the results based on the extending entity's class?
Example: There are checkboxes where the user can select which entities to retrieve.
[ ] Dog
[X] Cat
[X] Monkey
[ ] Bat
Now I want to retrieve the entities with a (Named)Query defined in the Animal
class. What kind of query parameters can I put into the query so that only the Cat and Monkey objects will be returned?