if (object != null) {
ClassDescriptor classDescriptor = mapper.getClassDescriptorByClass(object.getClass());
FieldDescriptor fieldDescriptor = classDescriptor.getUuidFieldDescriptor();
if (fieldDescriptor == null) {
throw new JcrMappingException("The bean doesn't have an uuid - classdescriptor : "
+ classDescriptor.getClassName());
}
String uuid = (String) ReflectionUtils.getNestedProperty(object, fieldDescriptor.getFieldName());
values[i] = valueFactory.createValue(MapReferenceValueEncoder.encodeKeyAndReference(key, uuid), PropertyType.STRING);