Annotation Interface JoinFetch


Specifies paths to be join-fetched in the query Can be repeated, to specify multiple fetches.
Author:
Tomasz Kaczmarzyk, Gerald Humphries
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
     
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
     
    boolean
    Hibernate since version 6.0 deduplicates results (https://github.com/hibernate/hibernate-orm/blob/6.0/migration-guide.adoc#query-sqm-distinct).
    jakarta.persistence.criteria.JoinType
     
  • Element Details

    • alias

      String alias
      Default:
      ""
    • joinType

      jakarta.persistence.criteria.JoinType joinType
      Default:
      LEFT
    • distinct

      boolean distinct
      Hibernate since version 6.0 deduplicates results (https://github.com/hibernate/hibernate-orm/blob/6.0/migration-guide.adoc#query-sqm-distinct). For the paged and count queries the distinct should be set to true (default behaviour) in main cases. Changing distinct to false (when using Hibernate) makes sense only in count queries -- in all other cases it will lead to unexpected behaviour.
      Default:
      true