Hi

When collections are persisted, Envers compares the collection's snapshot state 
with current state to find out what the modifications are. Up until now Envers 
hasn't supported collections of type IdBag, but I've now provided a fix for it. 
However - it includes some reflection calls that I really would like to avoid 
but I don't think it's possible with current NH Core code base.

In PersistentIdentifierBag the snapshot contains objects of the _private_ type 
SnapshotElement. In these object the idbag's item's id and value (=the item 
itself) is held. I need to be able to get the value out of this object (from 
event listeners). In my local fix I read this value through reflection but 
would of course like to avoid that if possible.

The reason why it was implemented like this in the first place, I _guess_ is 
because the implementor wanted to "protect" the id value from external calls. 
If this is the case, would it be possible to change Nh Core and let 
SnapshotElement be a public type but making it's id to private/internal?

/Roger

Reply via email to