Jakarta Persistence (JPA) Method

Subgraph<E> addTreatedElementSubgraph(
  PluralAttribute<? super T,?,? super E> attribute,
  Class<E> type
)


Add a node to the graph that corresponds to a collection element that is a managed type. This allows for construction of multi-node entity graphs that include related managed types.
Parameters:
attribute - attribute
Returns:
subgraph for the element attribute.
Throws:
IllegalStateException - if this EntityGraph has been statically defined.
IllegalArgumentException - if the attribute's target type is not an entity.
Since:
Jakarta Persistence (JPA) 3.2