File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -35,10 +35,7 @@ public final class QueryEnhancerFactory {
35
35
private static final boolean jSqlParserPresent = ClassUtils .isPresent ("net.sf.jsqlparser.parser.JSqlParser" ,
36
36
QueryEnhancerFactory .class .getClassLoader ());
37
37
38
- private static final boolean hibernatePresent = ClassUtils .isPresent ("org.hibernate.query.TypedParameterValue" ,
39
- QueryEnhancerFactory .class .getClassLoader ());
40
-
41
- private static final boolean hibernate5Present = ClassUtils .isPresent ("org.hibernate.jpa.TypedParameterValue" ,
38
+ private static final boolean hibernatePresent = ClassUtils .isPresent ("org.hibernate.Hibernate" ,
42
39
QueryEnhancerFactory .class .getClassLoader ());
43
40
44
41
static {
@@ -47,7 +44,7 @@ public final class QueryEnhancerFactory {
47
44
LOG .info ("JSqlParser is in classpath; If applicable, JSqlParser will be used" );
48
45
}
49
46
50
- if (hibernatePresent || hibernate5Present ) {
47
+ if (hibernatePresent ) {
51
48
LOG .info ("Hibernate is in classpath; If applicable, HQL parser will be used." );
52
49
}
53
50
}
@@ -74,7 +71,7 @@ public static QueryEnhancer forQuery(DeclaredQuery query) {
74
71
return new DefaultQueryEnhancer (query );
75
72
}
76
73
77
- return ( hibernatePresent || hibernate5Present ) ? JpaQueryEnhancer .forHql (query ) : JpaQueryEnhancer .forJpql (query );
74
+ return hibernatePresent ? JpaQueryEnhancer .forHql (query ) : JpaQueryEnhancer .forJpql (query );
78
75
}
79
76
80
77
}
You can’t perform that action at this time.
0 commit comments