mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-10-22 14:05:29 +02:00
Merge pull request #204 from creative-commoners/pulls/3.0/equality-for-all-dataobjects
FIX Don't assume a DataObject's table.
This commit is contained in:
commit
415fdeb0cd
@ -282,10 +282,6 @@ abstract class SearchIndex extends ViewableData
|
|||||||
throw new Exception('Can\'t add class to Index after fields have already been added');
|
throw new Exception('Can\'t add class to Index after fields have already been added');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!DataObject::getSchema()->classHasTable($class)) {
|
|
||||||
throw new \InvalidArgumentException('Can\'t add classes which don\'t have data tables (no $db or $has_one set on the class)');
|
|
||||||
}
|
|
||||||
|
|
||||||
$options = array_merge(array(
|
$options = array_merge(array(
|
||||||
'include_children' => true
|
'include_children' => true
|
||||||
), $options);
|
), $options);
|
||||||
|
Loading…
Reference in New Issue
Block a user