You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 20, 2018. It is now read-only.
class Employee(models.model):
manager = models.ForeignKey('Employee')
This is how Django implements recursive relationships.
To create a recursive relationship – an object that has a many-to-one relationship with itself – use models.ForeignKey('self', on_delete=models.CASCADE).
Is this available to use?
any example is appreciated.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This is what I meant by self-reference.
This is how Django implements recursive relationships.
Is this available to use?
any example is appreciated.
The text was updated successfully, but these errors were encountered: