On 2/1/06, Carlo C8E Miron <[EMAIL PROTECTED]> wrote: > 2006/1/26, Joseph Kocherhans <[EMAIL PROTECTED]>: > > > I'm writing up a draft of this right now. I'll post it sometime today. > > http://code.djangoproject.com/wiki/ModelInheritance > > referring to 2. Modeling joins in SQL, why did you use LEFT JOIN instead > of INNER JOIN? as subtypes inherits from supertypes, if you ask for an > ItalianRestaurant record you surely have also one row in Restaurant and > in Place table; so, why the need of a LEFT JOIN?
Beacuse I don't use INNER JOIN often enough for it to be readily accessible in my brain ;-) You're right though, INNER JOIN makes more sense. (I would hope that it performs better accross every supported db engine, but who knows) > This of course implies that if you ask for a Restaurant record you will > not have any ItalianRestaurant row (and obviously none > "has_decent_gnocchi" attribute. Yes, there is a typo on the wiki page, > "gnocchi" is the correct spell for that first course ;-) Feel free to fix the wiki. That's what it's for ;-) Joseph