Left outer join change in 1.2.1?


#1

I had a left outer join that suddenly stopped working; did anything
change in 1.2.1? dev trac appears to be down…

Am I suddenly doing something dumb?

In case the wrap makes this too hard to follow:
http://pastie.caboo.se/38858

this should show all Users who aren’t in TempUsers

User.find(:all, :joins => ‘as u left outer join temp_users as tu on
tu.login = u.login where tu.login is null’)

there is one record, but it’s giving nulls

=> [#<User:0xb59febc8 @attributes={“dept_code”=>nil, “manager_id”=>nil,
“common_name”=>nil, “deleted_at”=>nil, “admin”=>“0”, “id”=>nil,
“display_name”=>nil, “login”=>nil, “email”=>nil}, @readonly=true>]

mysql> SELECT * FROM users as u left outer join temp_users as tu on
tu.login = u.login where tu.login is null;
±-----±------±---------------±-------------±------------±------±-----------±----------±-----------±-----±------±------±-------------±------------±----------+
| id | login | email | display_name | common_name | admin |
deleted_at | dept_code | manager_id | id | login | email |
display_name | common_name | dept_code |
±-----±------±---------------±-------------±------------±------±-----------±----------±-----------±-----±------±------±-------------±------------±----------+
| 4793 | hhu | removed_email_address@domain.invalid | Hu, HXXX | HXXX Hu | 0 | NULL
| 0 | NULL | NULL | NULL | NULL | NULL | NULL
| NULL |
±-----±------±---------------±-------------±------------±------±-----------±----------±-----------±-----±------±------±-------------±------------±----------+


#2

Eh, I switched around the logic to use a right outer join, which looks
odd, but works fine.