File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
spring-data-jpa/src/main/java/org/springframework/data/jpa/provider Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -48,14 +48,20 @@ public static String getHibernateQuery(Object query) {
48
48
49
49
// Try the new Hibernate implementation first
50
50
if (query instanceof SqmQuery sqmQuery ) {
51
+
52
+ String hql = sqmQuery .getQueryString ();
53
+
54
+ if (!hql .equals ("<criteria>" )) {
55
+ return hql ;
56
+ }
57
+
51
58
return sqmQuery .getSqmStatement ().toHqlString ();
52
59
}
53
60
54
61
// Couple of cases in which this still breaks, see HHH-15389
55
62
} catch (RuntimeException o_O ) {}
56
63
57
64
// Try the old way, as it still works in some cases (haven't investigated in which exactly)
58
-
59
65
if (query instanceof Query <?> hibernateQuery ) {
60
66
return hibernateQuery .getQueryString ();
61
67
} else {
You can’t perform that action at this time.
0 commit comments