mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX Fixed incorrect hasDatabaseField() in SearchFilter::getDbName() - use hasOwnTableDatabaseField() instead (from r93860)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@93945 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
c340d9a1c5
commit
40629ef55f
@ -128,7 +128,7 @@ abstract class SearchFilter extends Object {
|
|||||||
// Todo: move to somewhere more appropriate, such as DataMapper, the magical class-to-be?
|
// Todo: move to somewhere more appropriate, such as DataMapper, the magical class-to-be?
|
||||||
$candidateClass = $this->model;
|
$candidateClass = $this->model;
|
||||||
while($candidateClass != 'DataObject') {
|
while($candidateClass != 'DataObject') {
|
||||||
if(singleton($candidateClass)->hasDatabaseField($this->name)) break;
|
if(singleton($candidateClass)->hasOwnTableDatabaseField($this->name)) break;
|
||||||
$candidateClass = get_parent_class($candidateClass);
|
$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);
|
if($candidateClass == 'DataObject') user_error("Couldn't find field $this->name in any of $this->model's tables.", E_USER_ERROR);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user