I have two models
class Customer(models.Model):
name = models.CharField(max_length=255, unique=True)
default_contact = models.ForeignKey("CustomerContact", verbose_name="...", related_name="default_contacts", null=True, on_delete=models.SET_NULL)
etc.
And
class CustomerContact(models.Model):
customer = models.ForeignKey(Customer, related_name='contacts')
user = models.OneToOneField(User, related_name='user_contacts', on_delete=models.SET_NULL)
address = models.ForeignKey(CustomerAddress, ....)
In this example Customer points to CustomerContact. At the same time CustomerContact points to Customer.
My coworker says that pointing Customer points to CustomerContact violates the OneToMany nature of ForeignKey.
What am I doing wrong?