protected function _findExistingTranslations($ruleSet)
    {
        $association = $this->_table->getAssociation($this->_translationTable->getAlias());

        $query = $association->find()
            ->select(['id', 'num' => 0])
            ->where(current($ruleSet))
            ->disableHydration()
            ->disableBufferedResults();

        unset($ruleSet[0]);
        foreach ($ruleSet as $i => $conditions) {
            $q = $association->find()
                ->select(['id', 'num' => $i])
                ->where($conditions);
            $query->unionAll($q);
        }

        return $query->all()->combine('num', 'id')->toArray();
    }
protected function _findExistingTranslations($ruleSet)
    {
        $association = $this->_table->getAssociation($this->_translationTable->getAlias());

        $query = $association->find()
            ->select(['id', 'num' => 0])
            ->where(current($ruleSet))
            ->disableHydration()
            ->disableBufferedResults();

        unset($ruleSet[0]);
        foreach ($ruleSet as $i => $conditions) {
            $q = $association->find()
                ->select(['id', 'num' => $i])
                ->where($conditions);
            $query->unionAll($q);
        }

        return $query->all()->combine('num', 'id')->toArray();
    }
protected function _findExistingTranslations ( $ ruleSet ) { $ association = $ this -> _table -> getAssociation ( $ this -> _translationTable -> getAlias ( ) ) ; $ query = $ association -> find ( ) -> select ( [ 'id' , 'num' => 0 ] ) -> where ( current ( $ ruleSet ) ) -> disableHydration ( ) -> disableBufferedResults ( ) ; unset ( $ ruleSet [ 0 ] ) ; foreach ( $ ruleSet as $ i => $ conditions ) { $ q = $ association -> find ( ) -> select ( [ 'id' , 'num' => $ i ] ) -> where ( $ conditions ) ; $ query -> unionAll ( $ q ) ; } return $ query -> all ( ) -> combine ( 'num' , 'id' ) -> toArray ( ) ; }
Returns the ids found for each of the condition arrays passed for the translations
table. Each records is indexed by the corresponding position to the conditions array

@param array $ruleSet an array of arary of conditions to be used for finding each
@return array
Returns the ids found for each of the condition arrays passed for the translations table . Each records is indexed by the corresponding position to the conditions array