I have a Django model with a custom specified primary key:
class ModelA(models.Model):
my_primary_key = models.CharField(primary_key=True, ...)
...
I also have other models which have ForeignKey references to this model:
class ModelB(models.Model):
ref_to_A = models.ForeignKey('ModelA', ...)
...
class ModelC(models.Model):
ref_to_A = models.ForeignKey('ModelA', ...)
...
...
I have some instances of ModelA, and need to change the value for my_primary_key for these instances.
What is the best way to go about doing this?