I like the idea of adding relations with an autocomplete field.Our ecommerce module SilverCart often deals with large amounts of objects and the checkboxes of the ComplexTableField and its descendants weren't very user friendly.
However, the GridFieldAddExistingAutocompleter just searches the attributes 'Title' and/or 'Name' of the related object:
protected function scaffoldSearchFields($dataClass) {
$obj = singleton($dataClass);
if($obj->hasDatabaseField('Title')) {
return array('Title');
} else if($obj->hasDatabaseField('Name')) {
return array('Name');
} else {
return null;
}
}
In case these fields do not exist the autocompleters request throws an exception.
I expected the autocompleter to use the information of the searchableFields() array. In SilverCart we often need to search the attributes of a further relation. For searchableFields() this was passible with dot-notation.
Should I provide a patch for this or is anyone still working on this issue?