Updates an instance.

        Args:
            **kwargs  :  Arbitrary keyword arguments. Column names are
                keywords and their new values are the values.

        Examples:

            >>> customer.update(email="newemail@x.com", name="new")

def update(self, **kwargs):
        """Updates an instance.

        Args:
            **kwargs  :  Arbitrary keyword arguments. Column names are
                keywords and their new values are the values.

        Examples:

            >>> customer.update(email="newemail@x.com", name="new")

        """
        kwargs = self._preprocess_params(kwargs)
        kwargs = self.preprocess_kwargs_before_update(kwargs)
        for key, value in kwargs.iteritems():
            cls = type(self)
            if not hasattr(cls, key) or isinstance(getattr(cls, key), property):
                continue
            if key not in self._no_overwrite_:
                setattr(self, key, value)
            if isinstance(getattr(self, key), OrderingList):
                getattr(self, key).reorder()
            elif isinstance(getattr(cls, key), AssociationProxyInstance):
                target_name = getattr(cls, key).target_collection
                target_rel = getattr(self, target_name)
                if isinstance(target_rel, OrderingList):
                    target_rel.reorder()
        try:
            self.session.commit()
            return self
        except Exception as e:
            self.session.rollback()
            raise e