'Removes the super-entity links of an instance record
@param table: the instance table
@param record: the instance record
@return: True if successful, otherwise False (caller must
roll back the transaction if False is returned!)'

@classmethod
def delete_super(cls, table, record):

    record_id = record.get(table._id.name, None)
    if (not record_id):
        raise RuntimeError('Record    ID    required    for    delete_super')
    get_config = cls.get_config
    supertables = get_config(table._tablename, 'super_entity')
    if (not supertables):
        return True
    if (not isinstance(supertables, (list, tuple))):
        supertables = [supertables]
    keys = {}
    load = {}
    for sname in supertables:
        stable = (cls.table(sname) if isinstance(sname, str) else sname)
        if (stable is None):
            continue
        key = stable._id.name
        if (key in record):
            keys[stable._tablename] = (key, record[key])
        else:
            load[stable._tablename] = key
    if load:
        row = current.db((table._id == record_id)).select(table._id, limitby=(0, 1), *load.values()).first()
        for (sname, key) in load.items():
            keys[sname] = (key, row[key])
    define_resource = current.s3db.resource
    update_record = record.update_record
    for sname in keys:
        (key, value) = keys[sname]
        if (not value):
            continue
        update_record(**{key: None})
        sresource = define_resource(sname, id=value)
        sresource.delete(cascade=True)
        if sresource.error:
            update_record(**{key: value})
            return False
    return True
