Each of my persisted classes has a version property of type Timestamp annotated with @Version. Guidelines suggest not using the auto-generated primary keys for equality checks. Is the version timestamp suitable? That would simplify things since the equals and hashCode overrides would be the same for all persisted objects in this package.
The version timestamp has the same problem as the primary key: generated in entity manager. Therefore looks like I have to use semi-unique business key for each class as Hibernate suggests.