Annotation Interface JoinFetch
@Retention(RUNTIME)
@Target({PARAMETER,TYPE})
@Repeatable(RepeatedJoinFetch.class)
public @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 -
Optional Element Summary
Optional Elements
-
Element Details
-
paths
String[] paths
-
-
-
alias
String alias- Default:
- ""
-
joinType
jakarta.persistence.criteria.JoinType joinType- Default:
- LEFT
-
distinct
boolean distinctHibernate 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
-