Jakarta Persistence (JPA) Method

Subgraph<? extends T> addSubclassSubgraph(
  Class<? extends T> 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
Returns:
subgraph for the subclass.
Throws:
IllegalStateException - if the EntityGraph has been statically defined.
IllegalArgumentException - if the type is not an entity type.
Deprecated:
use EntityGraph.addTreatedSubgraph
Since:
Jakarta Persistence (JPA) 1.0