Make sure type of the foreign key match the primary key

See https://github.com/strongloop/loopback/issues/353
Merge pull request #156 from strongloop/feature/fix-lb-353

Make sure type of the foreign key match the primary key