mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-10 13:14:50 +00:00
HHH-5816 Expose list of modified properties in PostUpdateEvent
This commit is contained in:
parent
1394d52bad
commit
dad565b22b
@ -191,6 +191,7 @@ private void postUpdate() {
|
|||||||
getId(),
|
getId(),
|
||||||
state,
|
state,
|
||||||
previousState,
|
previousState,
|
||||||
|
dirtyFields,
|
||||||
getPersister(),
|
getPersister(),
|
||||||
(EventSource) getSession()
|
(EventSource) getSession()
|
||||||
);
|
);
|
||||||
@ -209,6 +210,7 @@ private void postCommitUpdate() {
|
|||||||
getId(),
|
getId(),
|
||||||
state,
|
state,
|
||||||
previousState,
|
previousState,
|
||||||
|
dirtyFields,
|
||||||
getPersister(),
|
getPersister(),
|
||||||
(EventSource) getSession()
|
(EventSource) getSession()
|
||||||
);
|
);
|
||||||
|
@ -39,12 +39,15 @@ public class PostUpdateEvent extends AbstractEvent {
|
|||||||
private Object[] state;
|
private Object[] state;
|
||||||
private Object[] oldState;
|
private Object[] oldState;
|
||||||
private Serializable id;
|
private Serializable id;
|
||||||
|
//list of dirty properties as computed by Hibernate during a FlushEntityEvent
|
||||||
|
private final int[] dirtyProperties;
|
||||||
|
|
||||||
public PostUpdateEvent(
|
public PostUpdateEvent(
|
||||||
Object entity,
|
Object entity,
|
||||||
Serializable id,
|
Serializable id,
|
||||||
Object[] state,
|
Object[] state,
|
||||||
Object[] oldState,
|
Object[] oldState,
|
||||||
|
int[] dirtyProperties,
|
||||||
EntityPersister persister,
|
EntityPersister persister,
|
||||||
EventSource source
|
EventSource source
|
||||||
) {
|
) {
|
||||||
@ -53,6 +56,7 @@ public PostUpdateEvent(
|
|||||||
this.id = id;
|
this.id = id;
|
||||||
this.state = state;
|
this.state = state;
|
||||||
this.oldState = oldState;
|
this.oldState = oldState;
|
||||||
|
this.dirtyProperties = dirtyProperties;
|
||||||
this.persister = persister;
|
this.persister = persister;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,4 +75,8 @@ public EntityPersister getPersister() {
|
|||||||
public Object[] getState() {
|
public Object[] getState() {
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int[] getDirtyProperties() {
|
||||||
|
return dirtyProperties;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user