protected function _appendFields($query, $surrogate, $options)
    {
        if ($query->getEagerLoader()->isAutoFieldsEnabled() === false) {
            return;
        }

        $fields = $surrogate->clause('select') ?: $options['fields'];
        $target = $this->_targetTable;
        $autoFields = $surrogate->isAutoFieldsEnabled();

        if (empty($fields) && !$autoFields) {
            if ($options['includeFields'] && ($fields === null || $fields !== false)) {
                $fields = $target->getSchema()->columns();
            }
        }

        if ($autoFields === true) {
            $fields = array_filter((array)$fields);
            $fields = array_merge($fields, $target->getSchema()->columns());
        }

        if ($fields) {
            $query->select($query->aliasFields($fields, $this->_name));
        }
        $query->addDefaultTypes($target);
    }