src/ORM/DataObjectSchema.php
public function databaseFields($class, $aggregated = true)
    {
        $class = ClassInfo::class_name($class);
        if ($class === DataObject::class) {
            return [];
        }
        $this->cacheDatabaseFields($class);
        $fields = $this->databaseFields[$class];

        if (!$aggregated) {
            return $fields;
        }

        // Recursively merge
        $parentFields = $this->databaseFields(get_parent_class($class));
        return array_merge($fields, array_diff_key($parentFields, $fields));
    }
public function databaseFields($class, $aggregated = true)
    {
        $class = ClassInfo::class_name($class);
        if ($class === DataObject::class) {
            return [];
        }
        $this->cacheDatabaseFields($class);
        $fields = $this->databaseFields[$class];

        if (!$aggregated) {
            return $fields;
        }

        // Recursively merge
        $parentFields = $this->databaseFields(get_parent_class($class));
        return array_merge($fields, array_diff_key($parentFields, $fields));
    }
public function databaseFields ( $ class , $ aggregated = true ) { $ class = ClassInfo :: class_name ( $ class ) ; if ( $ class === DataObject :: class ) { return [ ] ; } $ this -> cacheDatabaseFields ( $ class ) ; $ fields = $ this -> databaseFields [ $ class ] ; if ( ! $ aggregated ) { return $ fields ; } // Recursively merge $ parentFields = $ this -> databaseFields ( get_parent_class ( $ class ) ) ; return array_merge ( $ fields , array_diff_key ( $ parentFields , $ fields ) ) ; }
Return the complete map of fields to specification on this object, including fixed_fields.
"ID" will be included on every table.

@param string $class Class name to query from
@param bool $aggregated Include fields in entire hierarchy, rather than just on this table

@return array Map of fieldname to specification, similiar to {@link DataObject::$db}.
Return the complete map of fields to specification on this object including fixed_fields . ID will be included on every table .