Skip to content

Commit edd66d9

Browse files
committed
Fix accidental use of deprecated setFlushMode method
Closes gh-28234
1 parent 35610a5 commit edd66d9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

spring-orm/src/main/java/org/springframework/orm/jpa/vendor/HibernateJpaDialect.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2022 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.
@@ -80,7 +80,7 @@
8080
* @author Costin Leau
8181
* @since 2.0
8282
* @see HibernateJpaVendorAdapter
83-
* @see org.hibernate.Session#setFlushMode
83+
* @see org.hibernate.Session#setHibernateFlushMode
8484
* @see org.hibernate.Transaction#setTimeout
8585
*/
8686
@SuppressWarnings("serial")
@@ -360,10 +360,9 @@ public SessionTransactionData(SessionImplementor session, @Nullable FlushMode pr
360360
this.readOnly = readOnly;
361361
}
362362

363-
@SuppressWarnings("deprecation")
364363
public void resetSessionState() {
365364
if (this.previousFlushMode != null) {
366-
this.session.setFlushMode(this.previousFlushMode);
365+
this.session.setHibernateFlushMode(this.previousFlushMode);
367366
}
368367
if (this.needsConnectionReset &&
369368
this.session.getJdbcCoordinator().getLogicalConnection().isPhysicallyConnected()) {

0 commit comments

Comments
 (0)