Update the instance to the database

        :param instance: an instance of modeled data object
        :param condition: condition evaluated to determine record(s) to update
        :returns: record id updated or None
        :rtype: int

def update(self, instance, condition):
        """Update the instance to the database

        :param instance: an instance of modeled data object
        :param condition: condition evaluated to determine record(s) to update
        :returns: record id updated or None
        :rtype: int
        """
        item = self.dbi.get(condition)
        if item is None:
            return None
        item.update(instance.as_dict())
        self.dbi.update(item, condition)
        return item.eid