Skip to content

Commit 856a960

Browse files
committed
1 parent f52c23f commit 856a960

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

src/main/java/gt/app/Application.java

-21
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
import gt.app.modules.user.AppPermissionEvaluatorService;
1111
import gt.app.modules.user.dto.PasswordUpdateDTO;
1212
import gt.app.modules.user.dto.UserDTO;
13-
import jakarta.persistence.EntityGraph;
14-
import jakarta.persistence.NamedEntityGraph;
1513
import lombok.extern.slf4j.Slf4j;
1614
import org.springframework.aot.hint.MemberCategory;
1715
import org.springframework.aot.hint.RuntimeHints;
@@ -59,28 +57,9 @@ public static void main(String[] args) throws UnknownHostException {
5957

6058
}
6159

62-
//until https://github.com/spring-projects/spring-data-jpa/issues/2681 gets released/
63-
64-
/**
65-
* currently getting this error https://github.com/spring-projects-experimental/spring-native/issues/1728
66-
* Caused by: java.lang.IllegalArgumentException: The EntityGraph-Feature requires at least a JPA 2.1 persistence provider
67-
* at org.springframework.util.Assert.isTrue(Assert.java:121) ~[na:na]
68-
* at org.springframework.data.jpa.repository.query.Jpa21Utils.tryGetFetchGraph(Jpa21Utils.java:103) ~[na:na]
69-
* at org.springframework.data.jpa.repository.query.Jpa21Utils.getFetchGraphHint(Jpa21Utils.java:76) ~[na:na]
70-
* at org.springframework.data.jpa.repository.query.AbstractJpaQuery.applyEntityGraphConfiguration(AbstractJpaQuery.java:250) ~[note-app:3.0.0-RC1]
71-
* at org.springframework.data.jpa.repository.query.AbstractJpaQuery.createQuery(AbstractJpaQuery.java:234) ~[note-app:3.0.0-RC1]
72-
* at org.springframework.data.jpa.repository.query.JpaQueryExecution$SingleEntityExecution.doExecute(JpaQueryExecution.java:193) ~[na:na]
73-
* at org.springframework.data.jpa.repository.query.JpaQueryExecution.execute(JpaQueryExecution.java:90) ~[note-app:3.0.0-RC1]
74-
* at org.springframework.data.jpa.repository.query.AbstractJpaQuery.doExecute(AbstractJpaQuery.java:148) ~[note-app:3.0.0-RC1]
75-
* at org.springframework.data.jpa.repository.query.AbstractJpaQuery.execute(AbstractJpaQuery.java:136) ~[note-app:3.0.0-RC1]
76-
* at org.springframework.data.repository.core.support.RepositoryMethodInvoker.doInvoke(RepositoryMethodInvoker.java:137) ~[note-app:3.0.0-RC1]
77-
*/
7860
class MyRuntimeHints implements RuntimeHintsRegistrar {
7961
@Override
8062
public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
81-
hints.reflection().registerType(NamedEntityGraph.class,
82-
hint -> hint.onReachableType(EntityGraph.class).withMembers(MemberCategory.INVOKE_PUBLIC_METHODS));
83-
8463
//record and dto classes -> get/set not found
8564
hints
8665
.reflection()

0 commit comments

Comments
 (0)