{"action":"opened","issue":{"url":"https://api.github.com/repos/Raizlabs/DBFlow/issues/102","labels_url":"https://api.github.com/repos/Raizlabs/DBFlow/issues/102/labels{/name}","comments_url":"https://api.github.com/repos/Raizlabs/DBFlow/issues/102/comments","events_url":"https://api.github.com/repos/Raizlabs/DBFlow/issues/102/events","html_url":"https://github.com/Raizlabs/DBFlow/issues/102","id":58807322,"number":102,"title":"Crash when loading 1-many relationship with cacheable models","user":{"login":"agrosner","id":2117859,"avatar_url":"https://avatars.githubusercontent.com/u/2117859?v=3","gravatar_id":"","url":"https://api.github.com/users/agrosner","html_url":"https://github.com/agrosner","followers_url":"https://api.github.com/users/agrosner/followers","following_url":"https://api.github.com/users/agrosner/following{/other_user}","gists_url":"https://api.github.com/users/agrosner/gists{/gist_id}","starred_url":"https://api.github.com/users/agrosner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agrosner/subscriptions","organizations_url":"https://api.github.com/users/agrosner/orgs","repos_url":"https://api.github.com/users/agrosner/repos","events_url":"https://api.github.com/users/agrosner/events{/privacy}","received_events_url":"https://api.github.com/users/agrosner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-24T21:20:09Z","updated_at":"2015-02-24T21:20:09Z","closed_at":null,"body":"When loading a list of data within a parent class by:\r\n\r\n```java\r\n\r\npublic List<Hours> getHours() {\r\n        if (hours == null) {\r\n            hours = Select.all(Hours.class, Condition.column(Hours$Table.HOUR_HOURID).is(Id));\r\n        }\r\n        return hours;\r\n    }\r\n\r\n```\r\n\r\nThrows a ```NullPointerException``` when trying to get the ```ModelCache```. In this instance we should create a dummy model (if null) and instantiate it so the cache exists."}}