class MyDataObject extends DataObject {
private static $db = array(
'Name' => 'Varchar'
);
private static $has_one = array(
'OtherDataObject' => 'OtherDataObject'
);
private static $summary_fields = array(
'Name',
'OtherDataObject.Name'
);
private static $field_labels = array(
'OtherDataObject.Name' => 'Other Data Object'
);
}
ModelAdmin uses the summary_fields
to generate the columns that it displays. To specify the name of the column, use field_labels
as shown.