Add an option to select_related to include OneToOneFields in depth-based search
|Reported by:||mnbayazit||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||1.3|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I've got a very complicated "Shipment" model that contains many foreign keys, and those foreign keys have more and more foreign keys. The Shipment model also points to 3 separate users which of course have profiles. I need to display *all* this information on a page, but it would be quite tedious to explicitly list out every model I want joined when I do my query just so that I can have it pre-fetch the profiles for me.
Can we add a special include_onetoonefields option that will work with the depth option?