Hello All,
I was working on a project, and realized that Django does not complain when
you create Circular Model relationship even when creating migrations where
i expected to have this complain
e.g. the example does not make any sense as far as relationships go but it
makes my point.
class User(models.Model):
# ...
product = models.ForeignKey("Product", on_delete=models.CASCADE)
class Products(models.Model):
bought_buy = models.ForeignKey(User, on_delete=models.CASCADE)
why is this or whats the reasoning behind Django team allowing this ?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/306a328a-173b-47dc-8e58-12aab538d14b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.