{"action":"created","issue":{"url":"https://api.github.com/repos/katowulf/mockfirebase/issues/69","labels_url":"https://api.github.com/repos/katowulf/mockfirebase/issues/69/labels{/name}","comments_url":"https://api.github.com/repos/katowulf/mockfirebase/issues/69/comments","events_url":"https://api.github.com/repos/katowulf/mockfirebase/issues/69/events","html_url":"https://github.com/katowulf/mockfirebase/issues/69","id":56671723,"number":69,"title":"Transactions require double .flush()","user":{"login":"Grety","id":8309006,"avatar_url":"https://avatars.githubusercontent.com/u/8309006?v=3","gravatar_id":"","url":"https://api.github.com/users/Grety","html_url":"https://github.com/Grety","followers_url":"https://api.github.com/users/Grety/followers","following_url":"https://api.github.com/users/Grety/following{/other_user}","gists_url":"https://api.github.com/users/Grety/gists{/gist_id}","starred_url":"https://api.github.com/users/Grety/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Grety/subscriptions","organizations_url":"https://api.github.com/users/Grety/orgs","repos_url":"https://api.github.com/users/Grety/repos","events_url":"https://api.github.com/users/Grety/events{/privacy}","received_events_url":"https://api.github.com/users/Grety/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-05T13:46:46Z","updated_at":"2015-02-05T14:13:40Z","closed_at":"2015-02-05T14:13:40Z","body":"Transactions work like a charm, however require double `.flush()` call and do not work for child nodes. (you need a direct reference to the item for transaction).\r\n[jsfiddle code](http://jsfiddle.net/Grety/2wq2dfvn/)\r\nI guess there is nothing to do about it since on transaction there is a deferred item placed in queue. But this is not evident. And it forced me to debug the MockFirebase to understand that it can work.\r\nShould I propose a 1. Tutorial transaction.md?\r\nor 2. is there another way to handle transactions with MockFirebase?"},"comment":{"url":"https://api.github.com/repos/katowulf/mockfirebase/issues/comments/73051825","html_url":"https://github.com/katowulf/mockfirebase/issues/69#issuecomment-73051825","issue_url":"https://api.github.com/repos/katowulf/mockfirebase/issues/69","id":73051825,"user":{"login":"bendrucker","id":808808,"avatar_url":"https://avatars.githubusercontent.com/u/808808?v=3","gravatar_id":"","url":"https://api.github.com/users/bendrucker","html_url":"https://github.com/bendrucker","followers_url":"https://api.github.com/users/bendrucker/followers","following_url":"https://api.github.com/users/bendrucker/following{/other_user}","gists_url":"https://api.github.com/users/bendrucker/gists{/gist_id}","starred_url":"https://api.github.com/users/bendrucker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bendrucker/subscriptions","organizations_url":"https://api.github.com/users/bendrucker/orgs","repos_url":"https://api.github.com/users/bendrucker/repos","events_url":"https://api.github.com/users/bendrucker/events{/privacy}","received_events_url":"https://api.github.com/users/bendrucker/received_events","type":"User","site_admin":false},"created_at":"2015-02-05T14:13:40Z","updated_at":"2015-02-05T14:13:40Z","body":"This is not related to transactions. It has to do with how the flush queue is designed. When you created deferred operations (writes or reads) from within another deferred operation, the brand new operation is not flushed in the same run. You need to flush again. If I'm misinterpreting the issue please elaborate on what's unexpected."}}