Skip to content

Commit 535be5f

Browse files
jrenaatsebersole
authored andcommitted
HHH-19015 - Deprecate Session#byId in favor of FindOptions
Signed-off-by: Jan Schatteman <[email protected]>
1 parent 99bb944 commit 535be5f

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,7 +1101,12 @@ public interface Session extends SharedSessionContract, EntityManager {
11011101
* @return an instance of {@link IdentifierLoadAccess} for executing the lookup
11021102
*
11031103
* @throws HibernateException If the given class does not resolve as a mapped entity
1104+
*
1105+
* @deprecated This method will be removed.
1106+
* Use {@link #find(Class, Object, FindOption...)} instead.
1107+
* See {@link FindOption}.
11041108
*/
1109+
@Deprecated(since = "7.1", forRemoval = true)
11051110
<T> IdentifierLoadAccess<T> byId(Class<T> entityClass);
11061111

11071112
/**
@@ -1113,7 +1118,12 @@ public interface Session extends SharedSessionContract, EntityManager {
11131118
* @return an instance of {@link IdentifierLoadAccess} for executing the lookup
11141119
*
11151120
* @throws HibernateException If the given name does not resolve to a mapped entity
1121+
*
1122+
* @deprecated This method will be removed.
1123+
* Use {@link #find(Class, Object, FindOption...)} instead.
1124+
* See {@link FindOption}.
11161125
*/
1126+
@Deprecated(since = "7.1", forRemoval = true)
11171127
<T> IdentifierLoadAccess<T> byId(String entityName);
11181128

11191129
/**

0 commit comments

Comments
 (0)