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 $searchable_fields = array(
'Name',
'OtherDataObjectID' => array(
'title' => 'Other Data Object'
)
);
}
Note the OtherDataObjectID
which converts a text field into a drop down of the relating object to filter with.