public function findTranslations(Query $query, array $options)
    {
        $locales = isset($options['locales']) ? $options['locales'] : [];
        $targetAlias = $this->_translationTable->getAlias();

        return $query
            ->contain([$targetAlias => function ($query) use ($locales, $targetAlias) {
                if ($locales) {
                    /* @var \Cake\Datasource\QueryInterface $query */
                    $query->where(["$targetAlias.locale IN" => $locales]);
                }

                return $query;
            }])
            ->formatResults([$this, 'groupTranslations'], $query::PREPEND);
    }