ForeignKey field with primary relationship
问题 I have two tables in my database (django: models in my app) as follows: class Model1(models.Model): name = models.CharField() #etc.... class Model2(models.Model): link = models.ForeignKey(Model1) Each Model1 can have many instances of Model2 linked to it, but Model2 can only be linked to one Model1 - a basic one-to-many relationship. My problem is this: I need each Model1 to have a primary Model2 - that is, one of it's related Model2s needs to somehow be marked as "primary". These are my