diff --git a/search/filters/SearchFilter.php b/search/filters/SearchFilter.php index c647a3eab..5df64815f 100644 --- a/search/filters/SearchFilter.php +++ b/search/filters/SearchFilter.php @@ -183,7 +183,8 @@ abstract class SearchFilter extends Object { if($candidateClass == 'DataObject') { // fallback to the provided name in the event of a joined column // name (as the candidate class doesn't check joined records) - return $this->fullName; + $parts = explode('.', $this->fullName); + return '"' . implode('"."', $parts) . '"'; } return "\"$candidateClass\".\"$this->name\""; diff --git a/tests/model/DataListTest.php b/tests/model/DataListTest.php index 456d48120..a96e2a6a8 100644 --- a/tests/model/DataListTest.php +++ b/tests/model/DataListTest.php @@ -625,7 +625,8 @@ class DataListTest extends SapphireTest { )); $this->assertEquals(2, $list->count()); - $this->assertEquals(array('Joe', 'Bob'), $list->column('Name')); + $values = $list->column('Name'); + $this->assertEquals(array_intersect($values, array('Joe', 'Bob')), $values); } public function testFilterAndExcludeById() {