protected function getKvData(array $ids)
    {
        if (empty($ids)) {
            return [];
        }
        $result = [];
        $sql = 'SELECT * FROM ' . self::KV_TABLE_NAME . '
                WHERE ' . self::KV_COLUMN_PARENT_ID . ' IN(' . join(',', array_map(function(){ return '?'; }, $ids)) . ')';
        $secondaryData = $this->getPersistence()->query($sql, $ids)->fetchAll(\PDO::FETCH_ASSOC);

        foreach ($secondaryData as $data) {
            $result[$data[self::KV_COLUMN_PARENT_ID]][$data[self::KV_COLUMN_KEY]] = $data[self::KV_COLUMN_VALUE];
        }

        return $result;
    }
protected function getKvData(array $ids)
    {
        if (empty($ids)) {
            return [];
        }
        $result = [];
        $sql = 'SELECT * FROM ' . self::KV_TABLE_NAME . '
                WHERE ' . self::KV_COLUMN_PARENT_ID . ' IN(' . join(',', array_map(function(){ return '?'; }, $ids)) . ')';
        $secondaryData = $this->getPersistence()->query($sql, $ids)->fetchAll(\PDO::FETCH_ASSOC);

        foreach ($secondaryData as $data) {
            $result[$data[self::KV_COLUMN_PARENT_ID]][$data[self::KV_COLUMN_KEY]] = $data[self::KV_COLUMN_VALUE];
        }

        return $result;
    }
protected function getKvData ( array $ ids ) { if ( empty ( $ ids ) ) { return [ ] ; } $ result = [ ] ; $ sql = 'SELECT * FROM ' . self :: KV_TABLE_NAME . '
                WHERE ' . self :: KV_COLUMN_PARENT_ID . ' IN(' . join ( ',' , array_map ( function ( ) { return '?' ; } , $ ids ) ) . ')' ; $ secondaryData = $ this -> getPersistence ( ) -> query ( $ sql , $ ids ) -> fetchAll ( \ PDO :: FETCH_ASSOC ) ; foreach ( $ secondaryData as $ data ) { $ result [ $ data [ self :: KV_COLUMN_PARENT_ID ] ] [ $ data [ self :: KV_COLUMN_KEY ] ] = $ data [ self :: KV_COLUMN_VALUE ] ; } return $ result ; }
Get secondary data by parent data id
@param array $ids
@return array
Get secondary data by parent data id