Fixes #3028 assign collection in prepareModel
Merge pull request #3036 from tgriesser/create-model-fix

Fixes #3028 assign collection in _prepareModel