public function update($data, $predicate, $combination = Predicate\PredicateSet::OP_AND, $validate_datatypes = false)
    {
        $prefixed_table = $this->prefixed_table;

        if ($data instanceof ArrayObject) {
            $d = (array) $data;
        } elseif (is_array($data)) {
            $d = $data;
        } else {
            throw new Exception\InvalidArgumentException(__METHOD__ . ": requires data to be array or an ArrayObject");
        }

        $this->checkDataColumns($d);

        if ($validate_datatypes) {
            $this->validateDatatypes($d);
        }

        $update = $this->sql->update($prefixed_table);
        $update->set($d);
        $update->where($predicate, $combination);

        $result = $this->executeStatement($update);

        return  $result->getAffectedRows();
    }