JPA Method
in javax.persistence.Subgraph

Subgraph<X> addSubgraph(
  String attributeName, 
  Class<X> type
)


Add a node to the graph that corresponds to a managed type with inheritance. This allows for multiple subclass subgraphs to be defined for this node of the entity graph. Subclass subgraphs will automatically include the specified attributes of superclass subgraphs
Parameters:
attributeName - name of the attribute
type - entity subclass
Return:
subgraph for the attribute
Throws:
IllegalArgumentException - if the attribute is not an attribute of this managed type.
IllegalArgumentException - if the attribute's target type is not a managed type
IllegalStateException - if this EntityGraph has been statically defined
Since:
JPA 2.1