Skip Headers

# Querying on an Inheritance Hierarchy

Previous

Next

When you query on a class that is part of an inheritance hierarchy, the session checks the descriptor to determine the type of the class, as follows:

- If you configure the descriptor to read subclasses (the default configuration), the query returns instances of the class and its subclasses.

- If you configure the descriptor not to read subclasses, the query returns only instances of the queried class, but no instances of the subclasses.

- If neither of these conditions applies, the class is a leaf class and does not have any subclasses. The query returns instances of the queried class.