{"action":"created","issue":{"url":"https://api.github.com/repos/Irrelon/ForerunnerDB/issues/91","repository_url":"https://api.github.com/repos/Irrelon/ForerunnerDB","labels_url":"https://api.github.com/repos/Irrelon/ForerunnerDB/issues/91/labels{/name}","comments_url":"https://api.github.com/repos/Irrelon/ForerunnerDB/issues/91/comments","events_url":"https://api.github.com/repos/Irrelon/ForerunnerDB/issues/91/events","html_url":"https://github.com/Irrelon/ForerunnerDB/issues/91","id":151117395,"number":91,"title":"loading persistent storage in Browser returns only subset of the data","user":{"login":"lmigula","id":5089407,"avatar_url":"https://avatars.githubusercontent.com/u/5089407?v=3","gravatar_id":"","url":"https://api.github.com/users/lmigula","html_url":"https://github.com/lmigula","followers_url":"https://api.github.com/users/lmigula/followers","following_url":"https://api.github.com/users/lmigula/following{/other_user}","gists_url":"https://api.github.com/users/lmigula/gists{/gist_id}","starred_url":"https://api.github.com/users/lmigula/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmigula/subscriptions","organizations_url":"https://api.github.com/users/lmigula/orgs","repos_url":"https://api.github.com/users/lmigula/repos","events_url":"https://api.github.com/users/lmigula/events{/privacy}","received_events_url":"https://api.github.com/users/lmigula/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Irrelon/ForerunnerDB/labels/bug%20report","name":"bug report","color":"fc2929"},{"url":"https://api.github.com/repos/Irrelon/ForerunnerDB/labels/comfirmed","name":"comfirmed","color":"207de5"},{"url":"https://api.github.com/repos/Irrelon/ForerunnerDB/labels/fixed%20in%20dev%20build","name":"fixed in dev build","color":"fbca04"},{"url":"https://api.github.com/repos/Irrelon/ForerunnerDB/labels/fixed%20in%20edge%20build","name":"fixed in edge build","color":"e11d21"},{"url":"https://api.github.com/repos/Irrelon/ForerunnerDB/labels/fixed%20in%20master%20build","name":"fixed in master build","color":"009800"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-26T12:11:06Z","updated_at":"2016-05-27T12:34:49Z","closed_at":"2016-05-18T10:17:40Z","body":"When loading data from the persistent  storage i don't get my whole dataset back.\r\nThe following code adds 25000 records to the dataset. After a reload the code returns only 200 sometimes 300 records.\r\n\r\n    var fdb = new ForerunnerDB();\r\n    db = fdb.db('test');\r\n    var items = db.collection('project');\r\n    items.load(function (err, tableStats, metaStats) {\r\n        if (!err) {\r\n            if (tableStats.rowCount == 0) {\r\n                var tmpData = [];\r\n                for (var i = 0; i < 25000; i++) {\r\n                    var data = {\r\n                        _id: i,\r\n                        data: 'data ' + i\r\n                    };\r\n                    tmpData.push(data);\r\n                }\r\n\r\n                items.insert(tmpData, function (result) {\r\n                    console.log('inserted: ' + result.inserted.length);\r\n                    console.log('failed: ' + result.failed.length);\r\n                });\r\n                items.save(function (err) {\r\n                    if (!err) {\r\n                        console.log('saved ')\r\n                    } else {\r\n                        console.log('somethings wrong: ' + JSON.stringify(err));\r\n                    }\r\n                    var result = items.find({});\r\n                    // console.log('found this ' + JSON.stringify(result));\r\n                    console.log('found that ' + result.length);\r\n                });\r\n            }\r\n            else {\r\n                console.log('tableStats this ' + JSON.stringify(tableStats));\r\n                console.log('metaStats this ' + JSON.stringify(metaStats));\r\n                var result = items.find({}, {\r\n                    $page: 6,\r\n                    $limit: 250\r\n                });\r\n                console.log('found this ' + result.length);\r\n            }\r\n\r\n        } else {\r\n            console.log('is Error!');\r\n        }\r\n    });\r\n\r\nThe output on the console is the following:\r\n    \r\n    inserted: 25000\r\n    failed: 0\r\n    saved \r\n    found that 25000\r\n    -- after a relaod of the page -- \r\n    tableStats this {\"foundData\":true,\"rowCount\":25000}\r\n    metaStats this {\"foundData\":true,\"rowCount\":0}\r\n    found this 200\r\n\r\nWhen I change the search to\r\n\r\n    var result = items.find({}, {\r\n       $page: 1,\r\n       $limit: 400\r\n       });\r\n            \r\nI get 0 records back.\r\n\r\n\r\nAm I missing something or is there a bug in this awesome DB?\r\n\r\nedit:\r\n\r\nWhen inspecting the data in the developer console i can see that saving the data was successful.\r\n\r\n![fore](https://cloud.githubusercontent.com/assets/5089407/14818115/87ef800e-0bbb-11e6-92fe-6aea227a10b8.png)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Irrelon/ForerunnerDB/issues/comments/222135004","html_url":"https://github.com/Irrelon/ForerunnerDB/issues/91#issuecomment-222135004","issue_url":"https://api.github.com/repos/Irrelon/ForerunnerDB/issues/91","id":222135004,"user":{"login":"lmigula","id":5089407,"avatar_url":"https://avatars.githubusercontent.com/u/5089407?v=3","gravatar_id":"","url":"https://api.github.com/users/lmigula","html_url":"https://github.com/lmigula","followers_url":"https://api.github.com/users/lmigula/followers","following_url":"https://api.github.com/users/lmigula/following{/other_user}","gists_url":"https://api.github.com/users/lmigula/gists{/gist_id}","starred_url":"https://api.github.com/users/lmigula/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmigula/subscriptions","organizations_url":"https://api.github.com/users/lmigula/orgs","repos_url":"https://api.github.com/users/lmigula/repos","events_url":"https://api.github.com/users/lmigula/events{/privacy}","received_events_url":"https://api.github.com/users/lmigula/received_events","type":"User","site_admin":false},"created_at":"2016-05-27T12:34:49Z","updated_at":"2016-05-27T12:34:49Z","body":"Thanks :)\r\nHopefully I'll have the time to look at it soon.\r\n\r\n"}}
{"actor":{"display_login":"lmigula"}}