code: private Object onId(Object key, Attribute attribute, Object fieldValue)
      {
          if (SingularAttribute.class.isAssignableFrom(attribute.getClass()) && ((SingularAttribute) attribute).isId())
          {
              key = fieldValue;
          }
          return key;
      }
docs: On id.
  
  @param key
  the key
  @param attribute
  the attribute
  @param fieldValue
  the field value
  @return the object