Revert "fix model + tests for foreign keys (issue #38)"

This reverts commit febf43b9a00d587ef7f7b03cbc11ae128dd43d81.