Skip to content

Commit

Permalink
Add missing reflection hint for NamedEntityGraph when EntityGraph is …
Browse files Browse the repository at this point in the history
  • Loading branch information
christophstrobl committed Oct 24, 2022
1 parent daa197e commit a2d82bc
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*/
package org.springframework.data.jpa.repository.aot;

import jakarta.persistence.NamedEntityGraph;

import java.util.Arrays;

import org.springframework.aot.hint.MemberCategory;
Expand All @@ -23,6 +25,7 @@
import org.springframework.aot.hint.TypeReference;
import org.springframework.data.jpa.domain.support.AuditingBeanFactoryPostProcessor;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.jpa.repository.support.QuerydslJpaPredicateExecutor;
import org.springframework.data.jpa.repository.support.SimpleJpaRepository;
Expand Down Expand Up @@ -72,5 +75,8 @@ public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader)
hint -> hint.withMembers(MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS, MemberCategory.INVOKE_PUBLIC_METHODS)
.onReachableType(QuerydslPredicateExecutor.class));
}

hints.reflection().registerType(NamedEntityGraph.class,
hint -> hint.onReachableType(EntityGraph.class).withMembers(MemberCategory.INVOKE_PUBLIC_METHODS));
}
}

0 comments on commit a2d82bc

Please sign in to comment.