@staticmethod
def replacement_key(model, id_):
    """Determine the replacement key for an object.

        :param model: Model class or instance.
        :param id_: Identifier of a class instance.
        :return: ``str`` representation identifying a database object.
        """
    if isinstance(model, str):
        name = model
    elif isinstance(model, type):
        name = model.__name__
    else:
        name = model.__class__.__name__
    return '__%s_%s__' % (name, id_)
