Cambiar valores (categoria) desde administrador

!!Saludos comunidad!!
Estoy realizando una app para la gestion de propiedades en la cual tengo categorias y dentro de cada categoria diferentes inmuebles, incluso eh agregado la opcion de publicar o no desde un Boolean y seleccion de categorias , todo desde el perfil de administrador.Mi pregunta es!! Como puedo darle al dueño de la app la opcion de cambiar y agregar el nombre de cada categoria sin que se rompan las relaciones en productos o boolean.
agradeceria sus comentarios, saludos

I hope I’m understanding your problem correctly, but it sounds like you have a category name, and you use that category name to build a relation from categories to properties and vice versa, correct? And the problem is that if you want to change the name of the category, it would break the relation to properties?

So, generally what I do is if I have a Categories table, I will also add a Row ID column. Then when you add a property to a category, you actually save the category row id in the Properties table instead of the category name. Row ID’s will never change, but a name could change. By writing the Row ID, and using it to establish a relation, it’s a lot safer, and you can change a category name without affecting the relation.

1 Like