How do I use prefetch_related for Generic Relationship in Django?

I've multiple models. Model1, Model2, Model3, ... Each model requires multiple let's say feature/images. Can be implemented by making different Image models ( i.e. Morel1Image ) then link with foreign key. Or, Make a Generic Image Model and use it wherever it needs. The problem is, I'm having similar queries ( debug ). And prefect_related isn't working ( Django might not have the feature ). Now how do I solve the problem ( efficiently ) ?

I'm expecting no similar or duplicate quary.

Back to Top