JPA Method
in jakarta.persistence.EntityGraph

Subgraph<S> addTreatedSubgraph(
  Class<S> type
)


Add additional attributes to this entity graph that correspond to attributes of subclasses of the entity type of this EntityGraph. Subclass subgraphs automatically include the specified attributes of superclass subgraphs.
Parameters:
type - entity subclass
Return:
subgraph for the subclass
Throws:
IllegalArgumentException - if the type is not an entity type
IllegalStateException - if the EntityGraph has been statically defined
Since:
JPA 2.1