private function getFieldsDefinitions($fields)
    {
        $fieldDefs = [];

        /** @var $field Field */
        foreach ($fields as $name => $field) {
            $def = $this->deepDeconstruct($field);

            if (null !== $field->relation && null !== $field->relation->toModel) {
                unset($def['constructorArgs']['to']);
            }

            $fieldDefs[] = $def;
        }

        return $fieldDefs;
    }