Changes between Version 7 and Version 8 of ModelInheritance
- Timestamp:
- Feb 25, 2006, 2:21:16 PM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ModelInheritance
v7 v8 96 96 Imagine we have more than one subclass of {{{Place}}} though. The join clause and the column list would get pretty hefty. This could obviously get unmanageable pretty quickly. 97 97 98 '' 99 I think some dbs have a maximum number of joins (something like 16), and even within the maximum, the query optimizer will either spend a while deciding which way to best join the tables or it will give up and choose the wrong way quickly. This wording is FUD-- I'll try to find specifics. --jdunck 100 '' 101 98 102 Another option is to lazily load objects like {{{Restaurant}}} and {{{ItalianRestaurant}}} while we're iterating over {{{Place.objects.all()}}}, but that requires a ''lot'' of database queries. Either way, doing this will be expensive, and api should reflect that. You're much better off ''just'' using {{{Place}}}s fields if you are going to iterate over {{{Place.objects.all()}}} 99 103