Is there any way to edit the object? We have N nu...
# talk-keto
f
Is there any way to edit the object? We have N number of sites with unique ids and we are saving site id as object and user id as subject so we have "User has access to Site" kind of relation. The site id can be changed. Suppose we have 1M users associated with some site and it's id changes, what do we do in this situation? delete those 1M records and recreate all of them again with new site id? or is there any other way around?
s
You should have some kind of immutable id instead. Is something even the same object if the ID changes? I'd argue it is not 😅
so you can use e.g. a UUIDv4 to generate unique and immutable IDs
f
actually those sites are hydra clients and those ids are hydra client ids and sometimes we need to remove the existing client and create new ones but when we do that access rights for all users from old site that we just deleted should be transferred to new one.
all the users from deleted client should have access to newly created client.
s
hm I see... maybe you want to create an overarching object representing the client (and maybe it's state) that has a perpetual ID?