{"action":"created","issue":{"url":"https://api.github.com/repos/orionjs/core/issues/16","labels_url":"https://api.github.com/repos/orionjs/core/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/orionjs/core/issues/16/comments","events_url":"https://api.github.com/repos/orionjs/core/issues/16/events","html_url":"https://github.com/orionjs/core/issues/16","id":54695624,"number":16,"title":"Setup Orion for editing the users collection, causes fail.","user":{"login":"silentwarrior","id":83322,"avatar_url":"https://avatars.githubusercontent.com/u/83322?v=3","gravatar_id":"","url":"https://api.github.com/users/silentwarrior","html_url":"https://github.com/silentwarrior","followers_url":"https://api.github.com/users/silentwarrior/followers","following_url":"https://api.github.com/users/silentwarrior/following{/other_user}","gists_url":"https://api.github.com/users/silentwarrior/gists{/gist_id}","starred_url":"https://api.github.com/users/silentwarrior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silentwarrior/subscriptions","organizations_url":"https://api.github.com/users/silentwarrior/orgs","repos_url":"https://api.github.com/users/silentwarrior/repos","events_url":"https://api.github.com/users/silentwarrior/events{/privacy}","received_events_url":"https://api.github.com/users/silentwarrior/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/orionjs/core/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/orionjs/core/labels/help+wanted","name":"help wanted","color":"159818"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-18T12:55:30Z","updated_at":"2015-01-19T17:06:37Z","closed_at":"2015-01-19T16:47:39Z","body":"Hello.\r\n\r\nI am trying to setup orion for the users collection, that is a special case if meteor.users exists (accounts package).\r\n\r\nSince the AddEntity will internally do Meteor.Collection (and new SimpleSchema), the \"error '/users/insert' is already defined\" will show up.\r\n\r\nIt should check if the collection is \"users\", and if so, use Meteor.users instead of new Mongo.Collection like I do in my app:\r\n```\r\n            var col;\r\n            if(collectionName === \"users\")\r\n                col = TSW.Collections[collectionName] = Meteor.users;\r\n            else\r\n                col = TSW.Collections[collectionName] = new Mongo.Collection(collectionName);\r\n```\r\n\r\n\r\n\r\nIf we use SimpleSchema on our app, it will also cause problems since orion also creates a new SimpleSchema object.\r\n\r\nI can for example compromise my design to receive a SimpleSchema object from orion.addEntity, in that case, I can then check, hey do we have an orionOptions object? if so, then addEntity and use the return for our SimpleSchema, if not then just create a new SimpleSchema.\r\n\r\n\r\nPS: For completeness, here is the code I am using : http://pastebin.com/dFk5nCvj\r\nPS2: Using Mongo.Collection because the docs state it should now be used like that, is suspect Meteor.Collection will be depreciated soon."},"comment":{"url":"https://api.github.com/repos/orionjs/core/issues/comments/70527415","html_url":"https://github.com/orionjs/core/issues/16#issuecomment-70527415","issue_url":"https://api.github.com/repos/orionjs/core/issues/16","id":70527415,"user":{"login":"nicolaslopezj","id":2042567,"avatar_url":"https://avatars.githubusercontent.com/u/2042567?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolaslopezj","html_url":"https://github.com/nicolaslopezj","followers_url":"https://api.github.com/users/nicolaslopezj/followers","following_url":"https://api.github.com/users/nicolaslopezj/following{/other_user}","gists_url":"https://api.github.com/users/nicolaslopezj/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolaslopezj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolaslopezj/subscriptions","organizations_url":"https://api.github.com/users/nicolaslopezj/orgs","repos_url":"https://api.github.com/users/nicolaslopezj/repos","events_url":"https://api.github.com/users/nicolaslopezj/events{/privacy}","received_events_url":"https://api.github.com/users/nicolaslopezj/received_events","type":"User","site_admin":false},"created_at":"2015-01-19T17:06:37Z","updated_at":"2015-01-19T17:06:37Z","body":"[User Actions](http://orion.meteor.com/docs/extending)"}}