From c888781975e587f84b3884370f43dc9def4a67b0 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Fri, 27 Nov 2009 02:00:13 +0000 Subject: [PATCH] BUGFIX Fixed SearchContextTest failure git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@93777 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- search/filters/SearchFilter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/search/filters/SearchFilter.php b/search/filters/SearchFilter.php index 977ade991..5f8e95c41 100755 --- a/search/filters/SearchFilter.php +++ b/search/filters/SearchFilter.php @@ -128,7 +128,7 @@ abstract class SearchFilter extends Object { // Todo: move to somewhere more appropriate, such as DataMapper, the magical class-to-be? $candidateClass = $this->model; while($candidateClass != 'DataObject') { - if(singleton($candidateClass)->hasField($this->name)) break; + if(singleton($candidateClass)->hasDatabaseField($this->name)) break; $candidateClass = get_parent_class($candidateClass); } if($candidateClass == 'DataObject') user_error("Couldn't find field $this->name in any of $this->model's tables.", E_USER_ERROR);