RelationTargetAuditMode.NOT_AUDITED works only if A isn't audited - it sounds as it is.
If A is audited you need to look it up yourself using the entity manager.
Maybe it's just my opinion, but shouldn't the explicit specification of RelationTargetAuditMode.NOT_AUDITED overrule the specification of A as audited from B's point of view?
Sure you are right, that it sounds as it is, but I think, as nobody would mark a relationship which should be audited with this annotation, it would be nice if it was possible to specify a relationship to an audited entity as RelationTargetAuditMode.NOT_AUDITED to point to the most recent version of this entity.
Hmm well I think that in fact in such a case an exception should be thrown. Wanting to get the latest version of an entity on an audited relation seems like a very rare use-case.
I have to agree with Peter here. There are some rare cases where you actually need this annotation to work in this way. I ran into the same issue myself now, and has been scratching my head for a few hours trying to figure out what I did wrong.
I also checked the envers source code to see where this annotation is read. The only place it is read, as far as I can see, is to avoid an error message if you link to an un-audited entity. It might therefore be a bit more involved in solving this problem.