public function getFieldType($field)
    {
        // default column type
        $type = $field->type;

        // try to find associated field type
        if (isset($this->type_associations[$type])) {
            $type = $this->type_associations[$type];
        }

        if ($type == 'text' && isset($field->allowHtml) && $field->allowHtml) {
            $type = 'html';
        }

        // if grid column type/formatter explicitly set in model
        if (isset($field->ui['display'])) {
            // @todo this is wrong and obsolete, as hasOne uses display for way different purpose

            $tmp = $field->ui['display'];
            if (isset($tmp['grid'])) {
                $tmp = $tmp['grid'];
            }
            if (is_string($tmp) && $tmp) {
                $type = $tmp;
            }
        }

        return $type;
    }