fix generator for namespaced model, fixes #263