value = versionsReader.createQuery().forEntitiesAtRevision(entityClass, revision)
.add(AuditEntity.relatedId(owningReferencePropertyName).eq(primaryKey)).getSingleResult();
} catch (NoResultException e) {
value = null;
} catch (NonUniqueResultException e) {
throw new AuditException("Many versions results for one-to-one relationship: (" + owningEntityName +
", " + owningReferencePropertyName + ")");
}
Setter setter = ReflectionTools.getSetter(obj.getClass(), propertyData);
setter.set(obj, value, null);