Fix foreign key compilation.
Add join equality shorthands.