@staticmethod
def _primary_keys_as_dict(obj):
    """Turn the primary keys for self into get parameters for web access."""
    ret = {}
    for pkey in obj.get_primary_keys():
        if pkey == 'id':
            ret['_id'] = obj.to_hash()['_id']
        else:
            ret[pkey] = obj.to_hash()[pkey]
    return ret
