This fixes the apparent scope and comparison issues when calling a foreign key relation.
Unit test for bug fix related to belongsTo relation.
It declares a Schema, uses memory. If it should be run for ALL DBs it will need to be changed.

Should fail pre cba174b and pass currently.
FIxed test for belongsTo
Merge pull request #205 from anatoliychakkaev/master

Fix pull request tests