Skip Headers

# Using Java

Previous

Next

Create a descriptor amendment method ("Configuring Amendment Methods") to customize the root or branch class descriptor's `InheritancePolicy` using `InheritancePolicy` method `dontReadSubclassesOnQueries` to configure a root or branch descriptor to not read subclasses. Optionally, you can use `InheritancePolicy` method `setReadAllSubclassesViewName` to optimize multiple table inheritance queries.

Example: Configuring Reading Subclasses on Queries shows an amendment method for the `Person` class. In this example, subclasses are not read on queries.

Configuring Reading Subclasses on Queries

    ...
    public static void addToPersonDescriptor(Descriptor descriptor) {
        descriptor.getInheritancePolicy().dontReadSubclassesOnQueries();
    }
    ...