{"action":"created","issue":{"url":"https://api.github.com/repos/greenrobot/greenDAO/issues/4","repository_url":"https://api.github.com/repos/greenrobot/greenDAO","labels_url":"https://api.github.com/repos/greenrobot/greenDAO/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/greenrobot/greenDAO/issues/4/comments","events_url":"https://api.github.com/repos/greenrobot/greenDAO/issues/4/events","html_url":"https://github.com/greenrobot/greenDAO/issues/4","id":2162643,"number":4,"title":"Entities implementing Parcelable","user":{"login":"greenrobot","id":242242,"avatar_url":"https://avatars.githubusercontent.com/u/242242?v=3","gravatar_id":"","url":"https://api.github.com/users/greenrobot","html_url":"https://github.com/greenrobot","followers_url":"https://api.github.com/users/greenrobot/followers","following_url":"https://api.github.com/users/greenrobot/following{/other_user}","gists_url":"https://api.github.com/users/greenrobot/gists{/gist_id}","starred_url":"https://api.github.com/users/greenrobot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greenrobot/subscriptions","organizations_url":"https://api.github.com/users/greenrobot/orgs","repos_url":"https://api.github.com/users/greenrobot/repos","events_url":"https://api.github.com/users/greenrobot/events{/privacy}","received_events_url":"https://api.github.com/users/greenrobot/received_events","type":"User","site_admin":false},"labels":[{"id":180115,"url":"https://api.github.com/repos/greenrobot/greenDAO/labels/Feature","name":"Feature","color":"009800","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2011-11-07T13:43:52Z","updated_at":"2016-11-21T08:27:30Z","closed_at":null,"body":"Annoying boiler plate code is just perfect for geenDAO...\n"},"comment":{"url":"https://api.github.com/repos/greenrobot/greenDAO/issues/comments/261873653","html_url":"https://github.com/greenrobot/greenDAO/issues/4#issuecomment-261873653","issue_url":"https://api.github.com/repos/greenrobot/greenDAO/issues/4","id":261873653,"user":{"login":"adjorno","id":22169804,"avatar_url":"https://avatars.githubusercontent.com/u/22169804?v=3","gravatar_id":"","url":"https://api.github.com/users/adjorno","html_url":"https://github.com/adjorno","followers_url":"https://api.github.com/users/adjorno/followers","following_url":"https://api.github.com/users/adjorno/following{/other_user}","gists_url":"https://api.github.com/users/adjorno/gists{/gist_id}","starred_url":"https://api.github.com/users/adjorno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adjorno/subscriptions","organizations_url":"https://api.github.com/users/adjorno/orgs","repos_url":"https://api.github.com/users/adjorno/repos","events_url":"https://api.github.com/users/adjorno/events{/privacy}","received_events_url":"https://api.github.com/users/adjorno/received_events","type":"User","site_admin":false},"created_at":"2016-11-21T08:27:30Z","updated_at":"2016-11-21T08:27:30Z","body":"Thanks, but I have just realized that its illegal to make greeanDao entities Parcelable:\r\nI don't want to reload entities from DB on device rotation because it takes some time, that is why I was going to put them in Bundle as Parcelable in onSaveInstanceState. Android tries to reuse Parcelables if its possible and I got the same ones and everything works fine in this case. But!.. There is another more tricky case - magic \"Don't keep activities\" button. This case is like device rotation but all the data should be restored from scratch. Restored greenDao entities will contain all the data but they wont have daoSession and app crashes with exception something like \"Entity is not attached to DAO context\".\r\n\r\nI see 2 solutions:\r\n- create real POJO entities and convert to them when I got result from DB request\r\n- drop greenDao and work with raw sqlite requests. \r\n\r\nIs there any ways to save & restore greenDao entities?"}}
{"actor":{"display_login":"adjorno"}}