public function databaseField($class, $field, $aggregated = true)
    {
        $fields = $this->databaseFields($class, $aggregated);
        return isset($fields[$field]) ? $fields[$field] : null;
    }