Skip to content

Commit 3cb2390

Browse files
committed
10664 - Prepare Envers for 5.2 - Deprecated AuditReader getCurrentRevision.
1 parent 885f76a commit 3cb2390

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

hibernate-envers/src/main/java/org/hibernate/envers/AuditReader.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,10 @@ <T> Map<Number, T> findRevisions(
224224
* @param <T> The type of the revision entity to find
225225
*
226226
* @return The current revision entity, to which any entries in the audit tables will be bound.
227+
* @deprecated (since 5.2), use {@link org.hibernate.envers.RevisionListener} instead. While this method is
228+
* being deprecated, expect a new API for this in 6.0.
227229
*/
230+
@Deprecated
228231
<T> T getCurrentRevision(Class<T> revisionEntityClass, boolean persist);
229232

230233
/**

migration-guide.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,4 @@ implement JPA methods now in core I decided to implement more of a composition a
7676
and EntityManager#getFlushMode.
7777
* Setting `hibernate.listeners.envers.autoRegister` has been deprecated in favor of
7878
`hibernate.envers.autoRegisterListeners`.
79+
* AuditReader#getCurrentRevision has been deprecated in favor of `org.hibernate.envers.RevisionListener`.

0 commit comments

Comments
 (0)