Tag: orm
-
posts
-
'self' ForeignKeys always result in a JOIN
I came across a little annoyance in Django today. I found that ForeignKeys that reference ‘self’, i.e. they point to the same table, always result in a join in a filter. Take this normal foreign key reference. class Customer(models.Models): ...