Re: Why does Django allow Circular Model Relation

2016-02-19 Thread Alex Heyden
You would use it any time the relationship means something different. It would generally be inappropriate to use it as a simple backwards relationship (Django does this for you), but there's no reason not to have multiple relationships in a number of directions. In an HR system, someone could be bo

Re: Why does Django allow Circular Model Relation

2016-02-19 Thread Tim Chase
On 2016-02-19 07:29, Eddilbert Macharia wrote: > Hello vadim when would such a relationship be needed I'm curious Think of a hierarchy at a company. Most employees have a supervisor. So your table would reference the supervisor in the same table: class Employee(models.Model): name = ...

Re: Why does Django allow Circular Model Relation

2016-02-19 Thread Eddilbert Macharia
Hello vadim when would such a relationship be needed I'm curious -- 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 django-users+unsubscr...@googlegroups.com. To p

Re: Why does Django allow Circular Model Relation

2016-02-19 Thread Vadim Serdiuk
Why should it be complained? I know a lot of the same cases that may be applied. пятница, 19 февраля 2016 г., 15:00:12 UTC+2 пользователь Eddilbert Macharia написал: > > Hello All, > > I was working on a project, and realized that Django does not complain > when you create Circular Model relati

Re: Why does Django allow Circular Model Relation

2016-02-19 Thread Javier Guerra Giraldez
On 19 February 2016 at 13:00, Eddilbert Macharia wrote: > 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 why would it complain? it might be

Why does Django allow Circular Model Relation

2016-02-19 Thread Eddilbert Macharia
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