So I want to compute a change log. The fields aren't so bad (beanutils and describe() might be a start), but what about the relationships?
Specifically, for to-one relationships can I just compare using == or do I have to use equals()? That is, will the proxy on version 1 and version 2 be the same if the relationship didn't change?
For to-manys I have a similar question. Do you get the same proxies for the set if the set contents are the same?
Any known gotchas?
The proxies will be different (see org.hibernate.envers.entities.mapper.relation.ToOneIdMapper). However I think you can compare ids - getting them shouldn't cause the proxy to be initialized. But double-check to be sure .
Adam