{"action":"closed","issue":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/4905","repository_url":"https://api.github.com/repos/sequelize/sequelize","labels_url":"https://api.github.com/repos/sequelize/sequelize/issues/4905/labels{/name}","comments_url":"https://api.github.com/repos/sequelize/sequelize/issues/4905/comments","events_url":"https://api.github.com/repos/sequelize/sequelize/issues/4905/events","html_url":"https://github.com/sequelize/sequelize/issues/4905","id":118242432,"number":4905,"title":"hasMany error: [TypeError: Cannot read property 'replace' of undefined]","user":{"login":"villanuevawill","id":7415822,"avatar_url":"https://avatars.githubusercontent.com/u/7415822?v=3","gravatar_id":"","url":"https://api.github.com/users/villanuevawill","html_url":"https://github.com/villanuevawill","followers_url":"https://api.github.com/users/villanuevawill/followers","following_url":"https://api.github.com/users/villanuevawill/following{/other_user}","gists_url":"https://api.github.com/users/villanuevawill/gists{/gist_id}","starred_url":"https://api.github.com/users/villanuevawill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/villanuevawill/subscriptions","organizations_url":"https://api.github.com/users/villanuevawill/orgs","repos_url":"https://api.github.com/users/villanuevawill/repos","events_url":"https://api.github.com/users/villanuevawill/events{/privacy}","received_events_url":"https://api.github.com/users/villanuevawill/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-22T06:04:58Z","updated_at":"2016-02-16T21:47:14Z","closed_at":"2016-02-16T21:47:14Z","body":"       const org = yield Organization.create(this.request.body.organization);\r\n       yield org.addUser(user);\r\n\r\nThe relationship is as follows:\r\n\r\n       Organization.hasMany(User);\r\n       User.belongsTo(Organization);\r\n\r\nThe error is as follows:\r\n\r\n    [TypeError: Cannot read property 'replace' of undefined]\r\n\r\nHowever, below works fine:\r\n\r\n    yield user.setOrganization(org)\r\n\r\nAny ideas?  Can you lead me in the right direction?  Should I post more information?"}}