ensure model class when creating a relation
added exception, when collection is not specified
Merge pull request #171 from schmunk42/hotfix/model

Hotfix/model