Changes between Version 25 and Version 26 of ModelInheritance
- Timestamp:
- Mar 19, 2006, 11:18:52 PM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ModelInheritance
v25 v26 106 106 '' 107 107 108 '' 109 There must be major performance problems with performing that many joins in a query. What's wrong with making the default behaviour to grab only the base fields, and documenting that? (except for the fact that subclass-specific methods might break .. hm.) --harmless 110 '' 111 108 112 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()}}} 109 113