      staff = models.OneToOneField(Staff, related_name='user')
  
      def __str__(self):
          return self.staff
 
</s> remove                             db_table = self.query.get_meta().db_table
                            fields = [f for f in fields if db_table in only_load and
                                      f.column in only_load[db_table]]
 </s> add                             fields = [f for f in fields if f.model._meta.db_table not in only_load or
                                      f.column in only_load[f.model._meta.db_table]] </s> remove     CategoryRelationship)
 </s> add     CategoryRelationship, Ticket21203Parent, Ticket21203Child)
class Ticket21203Parent(models.Model):
    parentid = models.AutoField(primary_key=True)
    parent_bool = models.BooleanField(default=True)
    created = models.DateTimeField(auto_now=True)

class Ticket21203Child(models.Model):
    childid = models.AutoField(primary_key=True)
    parent = models.ForeignKey(Ticket21203Parent)
      staff = models.OneToOneField(Staff, related_name='user')
  
      def __str__(self):
          return self.staff
class Ticket21203Parent(models.Model):
    parentid = models.AutoField(primary_key=True)
    parent_bool = models.BooleanField(default=True)
    created = models.DateTimeField(auto_now=True)

class Ticket21203Child(models.Model):
    childid = models.AutoField(primary_key=True)
    parent = models.ForeignKey(Ticket21203Parent)
keep keep keep add
 Fixed #21203 -- resolve_columns fields misalignment

In queries using .defer() together with .select_related() the values
and fields arguments didn't align properly for resolve_columns(). 
tests/queries/models.py