Jakarta Persistence (JPA) Method

Subgraph<? extends X> addKeySubgraph(
  Attribute<? super T,X> attribute,
  Class<? extends X> type
)


Add a node to the graph that corresponds to a map key that is a managed type with inheritance. This allows for construction of multi-node entity graphs that include related managed types. Subclass subgraphs will automatically include the specified attributes of superclass subgraphs
Parameters:
attribute - attribute
type - entity subclass
Returns:
subgraph for the attribute.
Throws:
IllegalStateException - if this EntityGraph has been statically defined.
IllegalArgumentException - if the attribute's target type is not a managed type entity.
Deprecated:
use Graph.addTreatedMapKeySubgraph
Since:
Jakarta Persistence (JPA) 1.0