code: public void trySetIdentity(Object entity, String id) {
          Class<?> entityType = entity.getClass();
          Field identityProperty = _conventions.getIdentityProperty(entityType);
  
          if (identityProperty == null) {
              return;
          }
  
          setPropertyOrField(identityProperty.getType(), entity, identityProperty, id);
      }
docs: Tries to set the identity property
  @param entity Entity
  @param id Id to set