BUGFIX Properly identify the foreign class in a many many relationship when building the schema
The first item in the array returned by DataObject#many_many is the parent class, not the foreign class, so we need to retrieve the second item of that list.
This commit is contained in:
parent
9629f0e0f5
commit
131a7d5ebc
|
@ -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