Implement scope/properties for BelongsTo (+ fix foreign key matching)

Also provides a workaround for #182