mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-10-22 14:05:29 +02:00
Fix many_many fieldData bug
This fixes a critical bug meaning that using many_many fields in full text searching would have always failed. the $singleton->many_many() lookup returns an array() of many-many components, however the line $class = $manyMany[0] is wrong, as the first value of the array is always the $dataClass (parentClass), not the otherClass (childClass). Changing this to $class = $manyMany[1] fixes this bug.
This commit is contained in:
parent
5b19ebf7b3
commit
6ab5969ac1
@ -87,7 +87,7 @@ abstract class SearchIndex extends ViewableData {
|
||||
);
|
||||
}
|
||||
else if ($manyMany = $singleton->many_many($lookup)) {
|
||||
$class = $manyMany[0];
|
||||
$class = $manyMany[1];
|
||||
$options['multi_valued'] = true;
|
||||
$options['lookup_chain'][] = array(
|
||||
'call' => 'method', 'method' => $lookup,
|
||||
|
Loading…
Reference in New Issue
Block a user