Skip to content

Commit 18bfa6b

Browse files
committed
Consider Hibernate Query.list() as query-terminating method
Closes gh-23248
1 parent 74ddf1b commit 18bfa6b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spring-orm/src/main/java/org/springframework/orm/jpa/SharedEntityManagerCreator.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -84,8 +84,9 @@ public abstract class SharedEntityManagerCreator {
8484
queryTerminatingMethods.add("execute"); // JPA 2.1 StoredProcedureQuery
8585
queryTerminatingMethods.add("executeUpdate");
8686
queryTerminatingMethods.add("getSingleResult");
87-
queryTerminatingMethods.add("getResultList");
8887
queryTerminatingMethods.add("getResultStream");
88+
queryTerminatingMethods.add("getResultList");
89+
queryTerminatingMethods.add("list"); // Hibernate Query.list() method
8990
}
9091

9192

0 commit comments

Comments
 (0)