/** * Converts the given raw id value into either {@link ObjectId} or {@link Class targetType}. * * @param id can be {@literal null}. * @param targetType * @return the converted {@literal id} or {@literal null} if the source was already {@literal null}. * @since 2.2 */ @Nullable public Object convertId(@Nullable Object id, Class<?> targetType) { return converter.convertId(id, targetType); }
id = convertId(id, entity.getIdProperty().getFieldType());