Skip to content

Commit d7fa18a

Browse files
cswarebeikov
authored andcommitted
HHH-15792: Explicitly add JavaDoc to make @deprecated hint for createSQLQuery visible in Eclipse
Explicitly add the JavaDoc to Session.java to provide users the @deprecated JavaDoc hint on how to resolve the deprecation warnings. Without this patch, e.g., in Eclipse, there are no warning generated when the method createSQLQuery is used which makes upgrading to 6.x harder. Signed-off-by: Sven Strickroth <[email protected]>
1 parent 9f9ed15 commit d7fa18a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

hibernate-core/src/main/java/org/hibernate/Session.java

+10
Original file line numberDiff line numberDiff line change
@@ -1171,6 +1171,16 @@ interface LockRequest {
11711171

11721172
<T> org.hibernate.query.Query<T> createNamedQuery(String name, Class<T> resultType);
11731173

1174+
/**
1175+
* Create a {@link NativeQuery} instance for the given SQL query string.
1176+
*
1177+
* @param queryString The SQL query
1178+
*
1179+
* @return The query instance for manipulation and execution
1180+
*
1181+
* @deprecated (since 5.2) use {@link #createNativeQuery(String)} instead
1182+
*/
1183+
@Deprecated
11741184
@Override
11751185
NativeQuery createSQLQuery(String queryString);
11761186
}

0 commit comments

Comments
 (0)