{"action":"created","issue":{"url":"https://api.github.com/repos/antoniopresto/react-native-local-mongodb/issues/24","repository_url":"https://api.github.com/repos/antoniopresto/react-native-local-mongodb","labels_url":"https://api.github.com/repos/antoniopresto/react-native-local-mongodb/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/antoniopresto/react-native-local-mongodb/issues/24/comments","events_url":"https://api.github.com/repos/antoniopresto/react-native-local-mongodb/issues/24/events","html_url":"https://github.com/antoniopresto/react-native-local-mongodb/issues/24","id":299058047,"number":24,"title":"Persistent datastore not working","user":{"login":"vincentneuts","id":24386053,"avatar_url":"https://avatars2.githubusercontent.com/u/24386053?v=4","gravatar_id":"","url":"https://api.github.com/users/vincentneuts","html_url":"https://github.com/vincentneuts","followers_url":"https://api.github.com/users/vincentneuts/followers","following_url":"https://api.github.com/users/vincentneuts/following{/other_user}","gists_url":"https://api.github.com/users/vincentneuts/gists{/gist_id}","starred_url":"https://api.github.com/users/vincentneuts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vincentneuts/subscriptions","organizations_url":"https://api.github.com/users/vincentneuts/orgs","repos_url":"https://api.github.com/users/vincentneuts/repos","events_url":"https://api.github.com/users/vincentneuts/events{/privacy}","received_events_url":"https://api.github.com/users/vincentneuts/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-02-21T17:23:14Z","updated_at":"2018-02-25T12:18:36Z","closed_at":null,"author_association":"NONE","body":"I tried to create a persitent datastore like this: \r\n\r\n```\r\nvar Datastore = require('react-native-local-mongodb');\r\nvar db = new Datastore({ filename: 'data',autoload:true});\r\nvar doc = { hello: 'world'  };\r\ndb.insert(doc);\r\ndb.find({}, function (err, docs) {\r\n                console.log(docs);\r\n });\r\n```\r\nIt didn't insert or find anything but, If I use it in memory like below. Then it works fine and just returns the doc that's inserted into it.\r\n\r\n```\r\nvar Datastore = require('react-native-local-mongodb');\r\nvar db = new Datastore();\r\nvar doc = { hello: 'world'  };\r\ndb.insert(doc);\r\ndb.find({}, function (err, docs) {\r\n                console.log(docs);\r\n });\r\n```\r\n\r\nAre there any android permissions that need to be set? \r\n\r\n\r\nUpdate:\r\n\r\nWhen performing insert, find or remove in an async function with wait before it it never finishes."},"comment":{"url":"https://api.github.com/repos/antoniopresto/react-native-local-mongodb/issues/comments/368304733","html_url":"https://github.com/antoniopresto/react-native-local-mongodb/issues/24#issuecomment-368304733","issue_url":"https://api.github.com/repos/antoniopresto/react-native-local-mongodb/issues/24","id":368304733,"user":{"login":"antoniopresto","id":6221799,"avatar_url":"https://avatars2.githubusercontent.com/u/6221799?v=4","gravatar_id":"","url":"https://api.github.com/users/antoniopresto","html_url":"https://github.com/antoniopresto","followers_url":"https://api.github.com/users/antoniopresto/followers","following_url":"https://api.github.com/users/antoniopresto/following{/other_user}","gists_url":"https://api.github.com/users/antoniopresto/gists{/gist_id}","starred_url":"https://api.github.com/users/antoniopresto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antoniopresto/subscriptions","organizations_url":"https://api.github.com/users/antoniopresto/orgs","repos_url":"https://api.github.com/users/antoniopresto/repos","events_url":"https://api.github.com/users/antoniopresto/events{/privacy}","received_events_url":"https://api.github.com/users/antoniopresto/received_events","type":"User","site_admin":false},"created_at":"2018-02-25T12:18:36Z","updated_at":"2018-02-25T12:18:36Z","author_association":"OWNER","body":"please, try 2.0.0"}}
{"actor":{"display_login":"antoniopresto"}}