As always, please forgive my ignorance. I promise I searched first.
Ive got my Django views put together for my employee class. One of the properties is the report_to field. This field is populated by a FK to another user obj.
My task now is to build a command tree. So I need a list of A reports to B reports to C reports to D all the way up the chain.
At first I thought is this would end up being a looped queury, but there has to be a better solution.
Prefetch_related maybe? Or select_related?
How do I get this to grab all the relations until it reaches ceo and reports_to is null?