This fixes the apparent scope and comparison issues when calling a foreign key relation.
Merge branch 'bug-track'

* bug-track:
  This fixes the apparent scope and comparison issues when calling a foreign key relation.
Added support for a Decimal type.