Skip to content

Commit 7938bbd

Browse files
committed
HHH-19829 - Deprecate MultiIdentifierLoadAccess and the Session.byMultipleIds() methods
Signed-off-by: Jan Schatteman <[email protected]>
1 parent b20cdf1 commit 7938bbd

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@
3131
* @see Session#byMultipleIds(Class)
3232
*
3333
* @author Steve Ebersole
34+
35+
* @deprecated Use forms of {@linkplain Session#findMultiple} accepting
36+
* {@linkplain jakarta.persistence.FindOption} instead of {@linkplain Session#byMultipleIds}.
3437
*/
38+
@Deprecated(since = "7.2", forRemoval = true)
3539
public interface MultiIdentifierLoadAccess<T> {
3640

3741
/**

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,7 +1165,12 @@ public interface Session extends SharedSessionContract, EntityManager {
11651165
* @throws HibernateException If the given class does not resolve as a mapped entity
11661166
*
11671167
* @see #findMultiple(Class, List, FindOption...)
1168+
*
1169+
* @deprecated This method will be removed.
1170+
* Use {@link #findMultiple(Class, List, FindOption...)} instead.
1171+
* See {@link MultiFindOption}.
11681172
*/
1173+
@Deprecated(since = "7.2", forRemoval = true)
11691174
<T> MultiIdentifierLoadAccess<T> byMultipleIds(Class<T> entityClass);
11701175

11711176
/**
@@ -1177,7 +1182,12 @@ public interface Session extends SharedSessionContract, EntityManager {
11771182
* @return an instance of {@link MultiIdentifierLoadAccess} for executing the lookup
11781183
*
11791184
* @throws HibernateException If the given name does not resolve to a mapped entity
1185+
*
1186+
* @deprecated This method will be removed.
1187+
* Use {@link #findMultiple(Class, List, FindOption...)} instead.
1188+
* See {@link MultiFindOption}.
11801189
*/
1190+
@Deprecated(since = "7.2", forRemoval = true)
11811191
<T> MultiIdentifierLoadAccess<T> byMultipleIds(String entityName);
11821192

11831193
/**

0 commit comments

Comments
 (0)