Hibernate JPA @FetchProfile.FetchOverride Example
@FetchProfile.FetchOverride
The @FetchProfile.FetchOverride annotation is used in conjunction with the @FetchProfile annotation, and it’s used for overriding the fetching strategy of a particular entity association.FetchProfile.FetchOverride Descriptor for a particular association override.
Fetch profile example
@Entity(name = "Employee")@FetchProfile(
name = "employee.projects",
fetchOverrides = {
@FetchProfile.FetchOverride(
entity = Employee.class,
association = "projects",
mode = FetchMode.JOIN
)
}
)
Comments
Post a Comment