iamteem/redisco

Self-reference (recursive) ManyToOne/OneToMany relationships available?

kishorpawar opened this issue · 0 comments

This is what I meant by self-reference.

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.