Jakarta Persistence (JPA) Method

boolean isLoaded(
  E entity,
  Attribute<? super E,?> attribute
)


Determine the load state of a given persistent attribute of an entity belonging to the persistence unit.
Parameters:
attribute - attribute whose load state is to be determined
entity - entity instance containing the attribute
Returns:
false if entity's state has not been loaded or if the attribute state has not been loaded, else true.
Since:
Jakarta Persistence (JPA) 3.2