silverstripe-labs/silverstripe-fulltextsearch — pull request #51 by froog (2014-06-25 02:22:09+00:00)
Title: 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.