From 57543a447ed58485af3ed76a139413db8ef97e85 Mon Sep 17 00:00:00 2001
From: Steve Ebersole <steve@hibernate.org>
Date: Tue, 17 Apr 2018 14:10:53 -0500
Subject: [PATCH] HHH-12494 - BasicQueryContract (binary compatability)

---
 .../src/main/java/org/hibernate/BasicQueryContract.java       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hibernate-core/src/main/java/org/hibernate/BasicQueryContract.java b/hibernate-core/src/main/java/org/hibernate/BasicQueryContract.java
index d57615e851..9042ec5af1 100644
--- a/hibernate-core/src/main/java/org/hibernate/BasicQueryContract.java
+++ b/hibernate-core/src/main/java/org/hibernate/BasicQueryContract.java
@@ -30,9 +30,9 @@ public interface BasicQueryContract<T extends BasicQueryContract> {
 	 * @deprecated (since 5.2) use {@link #setHibernateFlushMode} instead
 	 */
 	@Deprecated
-	default CommonQueryContract setFlushMode(FlushMode flushMode) {
+	default BasicQueryContract setFlushMode(FlushMode flushMode) {
 		setHibernateFlushMode( flushMode );
-		return (CommonQueryContract) this;
+		return this;
 	}
 
 	/**