mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-22 15:10:02 +00:00
#2887 - Fix for Setting isolation level disables query cache
Use getInternalConnection() in order to set the queryOnly = false flag which is done via connection()
This commit is contained in:
1 parent
0fd2f34ed0
commit
6e9a8704b4
2 files changed
+2
-2
No files matched your search
@@ -396,7 +396,7 @@ final class CQueryBuilder {
|
|||||||
sql = nativeQueryPaging(query, sql);
|
sql = nativeQueryPaging(query, sql);
|
||||||
}
|
}
|
||||||
query.setGeneratedSql(sql);
|
query.setGeneratedSql(sql);
|
||||||
Connection connection = request.transaction().connection();
|
Connection connection = request.transaction().getInternalConnection();
|
||||||
BeanDescriptor<?> desc = request.descriptor();
|
BeanDescriptor<?> desc = request.descriptor();
|
||||||
try {
|
try {
|
||||||
// For SqlServer we need either "selectMethod=cursor" in the connection string or fetch explicitly a cursorable
|
// For SqlServer we need either "selectMethod=cursor" in the connection string or fetch explicitly a cursorable
|
||||||
|
|||||||
+1
-1
@@ -35,7 +35,7 @@ abstract class TransactionFactory {
|
|||||||
*/
|
*/
|
||||||
final SpiTransaction setIsolationLevel(SpiTransaction t, boolean explicit, int isolationLevel) {
|
final SpiTransaction setIsolationLevel(SpiTransaction t, boolean explicit, int isolationLevel) {
|
||||||
if (isolationLevel > -1) {
|
if (isolationLevel > -1) {
|
||||||
Connection connection = t.connection();
|
Connection connection = t.getInternalConnection();
|
||||||
try {
|
try {
|
||||||
connection.setTransactionIsolation(isolationLevel);
|
connection.setTransactionIsolation(isolationLevel);
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
|
|||||||
Reference in new issue
Block a user