{"action":"created","issue":{"url":"https://api.github.com/repos/realm/realm-java/issues/1642","labels_url":"https://api.github.com/repos/realm/realm-java/issues/1642/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-java/issues/1642/comments","events_url":"https://api.github.com/repos/realm/realm-java/issues/1642/events","html_url":"https://github.com/realm/realm-java/issues/1642","id":112798365,"number":1642,"title":"Realm object does not get updated on the background thread","user":{"login":"Wattos","id":724759,"avatar_url":"https://avatars.githubusercontent.com/u/724759?v=3","gravatar_id":"","url":"https://api.github.com/users/Wattos","html_url":"https://github.com/Wattos","followers_url":"https://api.github.com/users/Wattos/followers","following_url":"https://api.github.com/users/Wattos/following{/other_user}","gists_url":"https://api.github.com/users/Wattos/gists{/gist_id}","starred_url":"https://api.github.com/users/Wattos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wattos/subscriptions","organizations_url":"https://api.github.com/users/Wattos/orgs","repos_url":"https://api.github.com/users/Wattos/repos","events_url":"https://api.github.com/users/Wattos/events{/privacy}","received_events_url":"https://api.github.com/users/Wattos/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/realm/realm-java/labels/Help","name":"Help","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-22T13:06:17Z","updated_at":"2015-10-23T02:24:08Z","closed_at":"2015-10-22T14:21:44Z","body":"I am trying to use realm for our application. I am currently running into an issue which is most likely a bug in realm.\r\n\r\n*Setup*:\r\n1) In a service I have a background thread\r\n2) The background thread I have a realm object (which was created on the background thread)\r\n3) On the main thread I add objects to realm\r\n4) Query the realm on the background thread\r\n\r\n*Expected*:\r\nI should be able to see the newly inserted objects in realm when querying for them\r\n\r\n*Observed*:\r\nI do not see the newly inserted objects in realm when querying on the background thread. They are fine when I am querying them in the foreground thread.\r\n\r\nI want to query realm in the background thread because it contains the messages I want to send asynchronously\r\n\r\n*Work around*:\r\nI need to open and close the realm before querying\r\n"},"comment":{"url":"https://api.github.com/repos/realm/realm-java/issues/comments/150415070","html_url":"https://github.com/realm/realm-java/issues/1642#issuecomment-150415070","issue_url":"https://api.github.com/repos/realm/realm-java/issues/1642","id":150415070,"user":{"login":"beeender","id":449296,"avatar_url":"https://avatars.githubusercontent.com/u/449296?v=3","gravatar_id":"","url":"https://api.github.com/users/beeender","html_url":"https://github.com/beeender","followers_url":"https://api.github.com/users/beeender/followers","following_url":"https://api.github.com/users/beeender/following{/other_user}","gists_url":"https://api.github.com/users/beeender/gists{/gist_id}","starred_url":"https://api.github.com/users/beeender/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beeender/subscriptions","organizations_url":"https://api.github.com/users/beeender/orgs","repos_url":"https://api.github.com/users/beeender/repos","events_url":"https://api.github.com/users/beeender/events{/privacy}","received_events_url":"https://api.github.com/users/beeender/received_events","type":"User","site_admin":false},"created_at":"2015-10-23T02:24:08Z","updated_at":"2015-10-23T02:24:08Z","body":"@Wattos Actually we have documented that :P \r\n\r\nhttps://realm.io/docs/java/latest/#auto-refresh"}}