Only if the objects are initialized and not lazy any more!
But you only get differences in previous-/currentState, if the collection object itself has changed. Otherwise previous-/currentState references to the same object id!
So, if you want to get differences, it's enough to check
Code:
previousState != currentState
and if this is true, the collection is not lazy and you can get the elements.
If
Code:
previousState == currentState
than there's no way to get the information, if the elements of the collection have changed, at the moment.
For further details check the Forum by searching for "Interceptor onFlushDirty"