Re: Equivalent of multi-table JOIN (another post on reverse select_related)

2017-11-06 Thread Samuel Abels
On Monday, November 6, 2017 at 9:36:11 PM UTC+1, Matthew Pava wrote: > > Is it really that bad? Maybe I’m missing something in your situation. > Ooooh, it isn't really. I incorrectly assumed that the query would perform like having an implicit DISTINCT(device.id). But it does in fact return abs

RE: Equivalent of multi-table JOIN (another post on reverse select_related)

2017-11-06 Thread Matthew Pava
om] On Behalf Of Samuel Abels Sent: Monday, November 6, 2017 2:22 PM To: Django users Subject: Re: Equivalent of multi-table JOIN (another post on reverse select_related) On Monday, November 6, 2017 at 9:15:09 PM UTC+1, Matthew Pava wrote: Maybe you are expecting too much from the user interfa

Re: Equivalent of multi-table JOIN (another post on reverse select_related)

2017-11-06 Thread Samuel Abels
On Monday, November 6, 2017 at 9:15:09 PM UTC+1, Matthew Pava wrote: > > Maybe you are expecting too much from the user interface. Shouldn’t you > at least request from the user what primary object you are looking for? > The primary model is always that one that is closest to "device"; step 2

RE: Equivalent of multi-table JOIN (another post on reverse select_related)

2017-11-06 Thread Matthew Pava
roups.com [mailto:django-users@googlegroups.com] On Behalf Of Samuel Abels Sent: Monday, November 6, 2017 1:59 PM To: Django users Subject: Re: Equivalent of multi-table JOIN (another post on reverse select_related) Thanks, I have seen that and plan to use it, but for this particular feature I

Re: Equivalent of multi-table JOIN (another post on reverse select_related)

2017-11-06 Thread Samuel Abels
> > https://github.com/burke-software/django-report-builder > > > > > > *From:* django...@googlegroups.com [mailto: > django...@googlegroups.com ] *On Behalf Of *Samuel Abels > *Sent:* Monday, November 6, 2017 1:33 PM > *To:* Django users > *Subject:* Equivalent

RE: Equivalent of multi-table JOIN (another post on reverse select_related)

2017-11-06 Thread Matthew Pava
users Subject: Equivalent of multi-table JOIN (another post on reverse select_related) I am working on a reporting feature that allows users for querying arbitrary models and fields, and present the result as a table. For example, consider the following object model: Package | v Device

Equivalent of multi-table JOIN (another post on reverse select_related)

2017-11-06 Thread Samuel Abels
I am working on a reporting feature that allows users for querying arbitrary models and fields, and present the result as a table. For example, consider the following object model: Package | v Device <- Component ^ ^ | | | Interface <---2--- Connection