I have these models:
class Foo(models.Model):
some_field = models.CharField()
class Meta:
pass
class Bar(Foo):
some_other_field = models.CharField()
class Meta:
pass
The example is simplified, in reality both models have a lot of fields.
When I query Bar, the Django ORM creates a query containing an inner join with Foo.
I don't need the information in Foo.
Question: Is there a way to query Bar without an inner join with Foo?
I realize that removing Bar extending Foo and making it a foreign key would be a better way to solve this problem. However, there's a lot of legacy code relying on this so I'd prefer a quick solution until I have the time and guts to refactor legacy parts of the app.
I also realize I can write an SQL query myself, but I'd prefer a solution that uses the ORM.