{"action":"created","issue":{"url":"https://api.github.com/repos/jedireza/drywall/issues/307","labels_url":"https://api.github.com/repos/jedireza/drywall/issues/307/labels{/name}","comments_url":"https://api.github.com/repos/jedireza/drywall/issues/307/comments","events_url":"https://api.github.com/repos/jedireza/drywall/issues/307/events","html_url":"https://github.com/jedireza/drywall/issues/307","id":93672989,"number":307,"title":"Connecting an admin CRUD page to a data collection on MongoLab","user":{"login":"bendtheji","id":8587962,"avatar_url":"https://avatars.githubusercontent.com/u/8587962?v=3","gravatar_id":"","url":"https://api.github.com/users/bendtheji","html_url":"https://github.com/bendtheji","followers_url":"https://api.github.com/users/bendtheji/followers","following_url":"https://api.github.com/users/bendtheji/following{/other_user}","gists_url":"https://api.github.com/users/bendtheji/gists{/gist_id}","starred_url":"https://api.github.com/users/bendtheji/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bendtheji/subscriptions","organizations_url":"https://api.github.com/users/bendtheji/orgs","repos_url":"https://api.github.com/users/bendtheji/repos","events_url":"https://api.github.com/users/bendtheji/events{/privacy}","received_events_url":"https://api.github.com/users/bendtheji/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jedireza/drywall/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-07-08T02:05:16Z","updated_at":"2015-07-10T06:32:45Z","closed_at":"2015-07-10T06:32:45Z","body":"Hi jedireza,\r\n\r\nFirstly, thank you so much for helping to solve my session timeout issue a few days ago, really helped me a lot :)\r\n\r\nI have looked at the drywall wiki and looked at the admin CRUD wiki page and I get a good idea of setting up a simple admin CRUD, however I would like to enquire on how one might be able to connect to the MongoLab data collections. I have already added the MongoLab URI to the config file but I am unsure of where I should go to next. Is there any documentation that I should be reading up on? Hope to hear from you soon. \r\n\r\nRegards."},"comment":{"url":"https://api.github.com/repos/jedireza/drywall/issues/comments/120248115","html_url":"https://github.com/jedireza/drywall/issues/307#issuecomment-120248115","issue_url":"https://api.github.com/repos/jedireza/drywall/issues/307","id":120248115,"user":{"login":"jedireza","id":979929,"avatar_url":"https://avatars.githubusercontent.com/u/979929?v=3","gravatar_id":"","url":"https://api.github.com/users/jedireza","html_url":"https://github.com/jedireza","followers_url":"https://api.github.com/users/jedireza/followers","following_url":"https://api.github.com/users/jedireza/following{/other_user}","gists_url":"https://api.github.com/users/jedireza/gists{/gist_id}","starred_url":"https://api.github.com/users/jedireza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jedireza/subscriptions","organizations_url":"https://api.github.com/users/jedireza/orgs","repos_url":"https://api.github.com/users/jedireza/repos","events_url":"https://api.github.com/users/jedireza/events{/privacy}","received_events_url":"https://api.github.com/users/jedireza/received_events","type":"User","site_admin":false},"created_at":"2015-07-10T06:32:45Z","updated_at":"2015-07-10T06:32:45Z","body":"It doesn't look like you can change the `_id` property once set.\r\nhttp://stackoverflow.com/a/4012997\r\n\r\nI tested this on the command line:\r\n\r\n```js\r\n> db.foo.insert({ _id: 'space', name: 'race' });\r\nWriteResult({ \"nInserted\" : 1 })\r\n\r\n> db.foo.insert({ name: 'dynamo' });\r\nWriteResult({ \"nInserted\" : 1 })\r\n\r\n> db.foo.find()\r\n{ \"_id\" : \"space\", \"name\" : \"race\" }\r\n{ \"_id\" : ObjectId(\"559f64dad4251d755065302d\"), \"name\" : \"dynamo\" }\r\n\r\n> db.foo.update({_id: ObjectId(\"559f64dad4251d755065302d\")}, {_id: 'custom'})\r\nWriteResult({\r\n        \"nMatched\" : 0,\r\n        \"nUpserted\" : 0,\r\n        \"nModified\" : 0,\r\n        \"writeError\" : {\r\n                \"code\" : 16837,\r\n                \"errmsg\" : \"The _id field cannot be changed from {_id: ObjectId('559f64dad4251d755065302d')} to {_id: \\\"custom\\\"}.\"\r\n        }\r\n})\r\n\r\n> db.foo.find()\r\n{ \"_id\" : \"space\", \"name\" : \"race\" }\r\n{ \"_id\" : ObjectId(\"559f64dad4251d755065302d\"), \"name\" : \"dynamo\" }\r\n```"}}