Enum Class GraphSemantic

java.lang.Object
java.lang.Enum<GraphSemantic>
org.hibernate.graph.GraphSemantic
All Implemented Interfaces:
Serializable, Comparable<GraphSemantic>, Constable

public enum GraphSemantic extends Enum<GraphSemantic>
JPA specifies two distinct ways to apply an EntityGraph - as a "fetch graph" or as a "load graph".
  • Enum Constant Details

    • FETCH

      public static final GraphSemantic FETCH
      Indicates that an EntityGraph should be interpreted as a JPA "fetch graph".
      • Attributes explicitly specified using an AttributeNodes are treated as FetchType.EAGER and fetched via a join or subsequent select.
      • Attributes not explicitly specified are treated as FetchType.LAZY and are not fetched.
    • LOAD

      public static final GraphSemantic LOAD
      Indicates that an EntityGraph should be interpreted as a JPA "load graph".
      • Attributes explicitly specified using an AttributeNodes are treated as FetchType.EAGER and fetched via a join or subsequent select.
      • Attributes not explicitly specified are treated as FetchType.LAZY or FetchType.EAGER depending on the mapping of the attribute, instead of forcing FetchType.LAZY.
  • Method Details