Re: Usage of select_related() on a OneToOneField with parent_link=True doesn't work

2015-11-14 Thread Simon Charette
Hi Gilad, The `parent_link` option can only be used if the model the o2o field is pointing to is a direct base of the model it's attached to. From what I understand `select_related` simply ignores `parent_link` fields since it assumes it's pointing to a MTI parent table which are JOINed by

Usage of select_related() on a OneToOneField with parent_link=True doesn't work

2015-11-14 Thread Gilad
Hi, Using Django 1.8.3, I have 2 models, both unmanaged (remote DB managed by another system), with something similar to that: class Parent(Model): ... some fields... class Child(Model): id = OneToOneField(primary_key=True, parent_link=True) ... some other fields ... Notes: 1. Parent is