Relation joinType default to LEFT OUTER JOIN why?

Hey guys,

I have a quick question regarding relations and AR.

Reading through the doc, I noticed that the default joinType when setting a relation is LEFT OUTER JOIN.

If I have a relation type of BELONGS_TO, surely it does not make sense to have a LEFT OUTER JOIN, but INNER JOIN instead (regarding performance)? Or am I misunderstanding something?

Do I have to force the joinType to INNER JOIN everytime I set up a relation type of BELONGS_TO?


and what if you have inconsistent database based on MyISAM tables which do not support contraints and foreign keys or nullable references? For example User and UserGroup. User belongs to single group, but there are users without group (null value in foreign key table) or some of them have foreign key to not existent group (deleted). I would rather get null for related object (group) instead of not get such Users in query results at all…

Yeah that makes sense actually :)