public function injectNewValues(InputInterface $input, $instance, $targetId = 'id')
    {
        list($fields, $associations) = $this->getConfigs($instance);
        $fieldNames = array_keys(array_merge($fields, $associations));

        foreach ($fieldNames as $fieldName) {
            $value = ObjectFieldUtil::getFieldValue($input, $fieldName);

            if (empty($value)) {
                continue;
            }

            $value = ObjectFieldUtil::convertEmptyValue($value);

            if ((array_key_exists($fieldName, $fields))) {
                ObjectFieldUtil::setFieldValue($instance, $fieldName, $value);
            } elseif ((array_key_exists($fieldName, $associations))) {
                $this->setAssociationValue($instance, $fieldName, $value, $associations[$fieldName], $targetId);
            }
        }
    }