{"action":"created","issue":{"url":"https://api.github.com/repos/Raizlabs/DBFlow/issues/83","labels_url":"https://api.github.com/repos/Raizlabs/DBFlow/issues/83/labels{/name}","comments_url":"https://api.github.com/repos/Raizlabs/DBFlow/issues/83/comments","events_url":"https://api.github.com/repos/Raizlabs/DBFlow/issues/83/events","html_url":"https://github.com/Raizlabs/DBFlow/issues/83","id":57966128,"number":83,"title":"Crash - Date and java.lang.NullPointerException","user":{"login":"Rainer-Lang","id":9607880,"avatar_url":"https://avatars.githubusercontent.com/u/9607880?v=3","gravatar_id":"","url":"https://api.github.com/users/Rainer-Lang","html_url":"https://github.com/Rainer-Lang","followers_url":"https://api.github.com/users/Rainer-Lang/followers","following_url":"https://api.github.com/users/Rainer-Lang/following{/other_user}","gists_url":"https://api.github.com/users/Rainer-Lang/gists{/gist_id}","starred_url":"https://api.github.com/users/Rainer-Lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rainer-Lang/subscriptions","organizations_url":"https://api.github.com/users/Rainer-Lang/orgs","repos_url":"https://api.github.com/users/Rainer-Lang/repos","events_url":"https://api.github.com/users/Rainer-Lang/events{/privacy}","received_events_url":"https://api.github.com/users/Rainer-Lang/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Raizlabs/DBFlow/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/Raizlabs/DBFlow/milestones/4","labels_url":"https://api.github.com/repos/Raizlabs/DBFlow/milestones/4/labels","id":983421,"number":4,"title":"1.5.2","description":null,"creator":{"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},"open_issues":0,"closed_issues":1,"state":"open","created_at":"2015-02-17T19:07:05Z","updated_at":"2015-02-17T19:14:08Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2015-02-17T19:01:27Z","updated_at":"2015-02-17T19:14:08Z","closed_at":"2015-02-17T19:14:08Z","body":"java.lang.NullPointerException: Attempt to invoke virtual method 'long java.util.Date.getTime()' on a null object reference\r\n\r\nI have 2 classes:\r\n'''java \r\n@Table(databaseName = AppDatabase.DB_NAME)\r\npublic class Car extends BaseModel {\r\n   \r\n    @Column(columnType = Column.PRIMARY_KEY_AUTO_INCREMENT)\r\n    public long _id;\r\n\r\n    @Column\r\n    public String model;\r\n\r\n    @Column(notNull = false)\r\n    public Date manufacturedDate;\r\n}\r\n'''\r\nand\r\n'''java @Table(databaseName = AppDatabase.DB_NAME)\r\npublic class Owner extends BaseModel {\r\n\r\n    @Column(columnType = Column.PRIMARY_KEY_AUTO_INCREMENT)\r\n    public long _id;\r\n\r\n    @Column(columnType = Column.FOREIGN_KEY,\r\n            references = {@ForeignKeyReference(columnType = int.class, columnName = \"id_car\", foreignColumnName = \"_id\")})\r\n\tpublic Car id_car;\r\n    \r\n\t@Column\r\n\tpublic String name;\r\n\r\n    @Column\r\n\tpublic Date purchasedDate;\r\n\t\r\n    @Column\r\n\tpublic Date soldDate;\r\n}'''\r\n\r\nfor tests:\r\nCar car = new Car();\r\ncar.model = \"Honda\";\r\ncar.save(false);\r\n\r\nOwner owner = new Owner();\r\nowner.name = \"Smith\";\r\nowner.id_car = car;\r\nowner.save(false);\r\n\r\nCrash happens at \"owner.save(false);\""},"comment":{"url":"https://api.github.com/repos/Raizlabs/DBFlow/issues/comments/74731562","html_url":"https://github.com/Raizlabs/DBFlow/issues/83#issuecomment-74731562","issue_url":"https://api.github.com/repos/Raizlabs/DBFlow/issues/83","id":74731562,"user":{"login":"Rainer-Lang","id":9607880,"avatar_url":"https://avatars.githubusercontent.com/u/9607880?v=3","gravatar_id":"","url":"https://api.github.com/users/Rainer-Lang","html_url":"https://github.com/Rainer-Lang","followers_url":"https://api.github.com/users/Rainer-Lang/followers","following_url":"https://api.github.com/users/Rainer-Lang/following{/other_user}","gists_url":"https://api.github.com/users/Rainer-Lang/gists{/gist_id}","starred_url":"https://api.github.com/users/Rainer-Lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rainer-Lang/subscriptions","organizations_url":"https://api.github.com/users/Rainer-Lang/orgs","repos_url":"https://api.github.com/users/Rainer-Lang/repos","events_url":"https://api.github.com/users/Rainer-Lang/events{/privacy}","received_events_url":"https://api.github.com/users/Rainer-Lang/received_events","type":"User","site_admin":false},"created_at":"2015-02-17T19:14:08Z","updated_at":"2015-02-17T19:14:08Z","body":"ok thanks.\r\n\r\nclosing issue"}}