When you annotate a field in an entity using the following annotation:
@Audited(targetAuditMode = RelationTargetAuditMode.NOT_AUDITED)
One would expect to get the current version of the entity when you get the value out of this field. This annotation is currently only used to avoid error messages when linking to an un-audited entity.
There are some situations where you want to get the current version of an entity instead of the entity at the given version.
In my case I link to users from an entity. If I get the entity from the connection, I get an outdated version of the entity. In this case I would like to always get the current version of the entity from this connection.
If the target entity is not found, original Hibernate annotations should be honored:
@NotFound(action = NotFoundAction.IGNORE)