{"action":"opened","issue":{"url":"https://api.github.com/repos/emmerge/graviton/issues/5","labels_url":"https://api.github.com/repos/emmerge/graviton/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/emmerge/graviton/issues/5/comments","events_url":"https://api.github.com/repos/emmerge/graviton/issues/5/events","html_url":"https://github.com/emmerge/graviton/issues/5","id":58406969,"number":5,"title":"hasMany 'users' errors with \"Collection named 'users' has not been defined\"","user":{"login":"johndevor","id":75827,"avatar_url":"https://avatars.githubusercontent.com/u/75827?v=3","gravatar_id":"","url":"https://api.github.com/users/johndevor","html_url":"https://github.com/johndevor","followers_url":"https://api.github.com/users/johndevor/followers","following_url":"https://api.github.com/users/johndevor/following{/other_user}","gists_url":"https://api.github.com/users/johndevor/gists{/gist_id}","starred_url":"https://api.github.com/users/johndevor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johndevor/subscriptions","organizations_url":"https://api.github.com/users/johndevor/orgs","repos_url":"https://api.github.com/users/johndevor/repos","events_url":"https://api.github.com/users/johndevor/events{/privacy}","received_events_url":"https://api.github.com/users/johndevor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-20T20:36:11Z","updated_at":"2015-02-20T20:36:11Z","closed_at":null,"body":"In this example below, I'm unable to get a 'hasMany' relationship with Meteor's users collection. \r\n\r\n```\r\nChatModel = Graviton.Model.extend({\r\n  hasMany: {\r\n    users: {\r\n      collectionName: 'users',\r\n      foreignKey: 'chatId'\r\n    }\r\n  },\r\n  belongsToMany: {\r\n    users: {\r\n      collectionName: 'users',\r\n      field: 'userIds'\r\n    }\r\n  }\r\n}, { });\r\n\r\nChat = Graviton.define(\"chats2\", {\r\n  modelCls: ChatModel\r\n});\r\n\r\nvar c = Chat.create({ }); // This command errors\r\n```\r\n\r\nThe resulting error is:\r\n\r\n```\r\n\"Collection named 'users' has not been defined\"\r\n```\r\n\r\nKind of a Meteor newbie here, so I apologize if this is entirely obvious. "}}