fixed indexed foreign keys with references. added some validations to the models
Merge pull request #28 from simensta/fixing-validations

fixed indexed foreign keys with references. added some validations to th...