{"action":"created","issue":{"url":"https://api.github.com/repos/Wackymax/CPOrm/issues/13","repository_url":"https://api.github.com/repos/Wackymax/CPOrm","labels_url":"https://api.github.com/repos/Wackymax/CPOrm/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/Wackymax/CPOrm/issues/13/comments","events_url":"https://api.github.com/repos/Wackymax/CPOrm/issues/13/events","html_url":"https://github.com/Wackymax/CPOrm/issues/13","id":229038994,"number":13,"title":"NPE querying View","user":{"login":"otsenreDC","id":8218768,"avatar_url":"https://avatars0.githubusercontent.com/u/8218768?v=3","gravatar_id":"","url":"https://api.github.com/users/otsenreDC","html_url":"https://github.com/otsenreDC","followers_url":"https://api.github.com/users/otsenreDC/followers","following_url":"https://api.github.com/users/otsenreDC/following{/other_user}","gists_url":"https://api.github.com/users/otsenreDC/gists{/gist_id}","starred_url":"https://api.github.com/users/otsenreDC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otsenreDC/subscriptions","organizations_url":"https://api.github.com/users/otsenreDC/orgs","repos_url":"https://api.github.com/users/otsenreDC/repos","events_url":"https://api.github.com/users/otsenreDC/events{/privacy}","received_events_url":"https://api.github.com/users/otsenreDC/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-05-16T13:45:31Z","updated_at":"2017-05-17T12:53:05Z","closed_at":"2017-05-16T14:35:50Z","body":"Hi Wackymax!\r\n\r\nI got this error\r\n`java.lang.RuntimeException: Unable to start activity ComponentInfo{com.company.auditoriamedica/com.company.auditoriamedica.activities.AuditsActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String za.co.cporm.model.generate.TableDetails$ColumnDetails.getColumnName()' on a null object reference`\r\n\r\nRunning this piece of code\r\n`long count = CPOrm.countAll(AuditClaimAffiliateView.class);`\r\n\r\nOn this View definition\r\n`@Table\r\npublic class AuditClaimAffiliateView implements TableView {\r\n\r\n    @Column\r\n    private String code;\r\n    @Column\r\n    private String name = \"\";\r\n    @Column\r\n    private String lastName = \"\";\r\n    @Column\r\n    private Boolean autoPriority = false;\r\n    @Column\r\n    private Boolean priority = false;\r\n    @Column\r\n    private Date serviceDate = Calendar.getInstance().getTime();\r\n\r\n\r\n    @Override\r\n    public String getTableViewSql() {\r\n        return \"SELECT \" +\r\n                \"AF.\" + Affiliate.Contract.COL_CODE + \", \" +\r\n                \"AF.\" + Affiliate.Contract.COL_NAME + \", \" +\r\n                \"AF.\" + Affiliate.Contract.COL_LAST_NAME + \", \" +\r\n                \"AU.\" + Audit.Contract.COL_PRIORITY + \", \" +\r\n                \"AU.\" + Audit.Contract.COL_AUTO_PRIORITY + \", \" +\r\n                \"CL.\" + Claim.Contract.COL_SERVICE_DATE + \" \" +\r\n                \"FROM affiliate AF, audit AU, claim CL\" + \" \" +\r\n                \"WHERE \" +\r\n                \"AF.\" + Affiliate.Contract.COL_CODE + \" = \" +\r\n                \"AU.\" + Audit.Contract.COL_AFFILIATE_ID + \" \" +\r\n                \"AND \" + \" \" +\r\n                \"CL.\" + Claim.Contract.COL_YEAR + \" = \" +\r\n                \"AU.\" + Audit.Contract.COL_YEAR + \" AND \" +\r\n                \"CL.\" + Claim.Contract.COL_BRANCH + \" = \" +\r\n                \"AU.\" + Audit.Contract.COL_BRANCH + \" AND \" +\r\n                \"CL.\" + Claim.Contract.COL_COMPANY + \" = \" +\r\n                \"AU.\" + Audit.Contract.COL_COMPANY + \" AND \" +\r\n                \"CL.\" + Claim.Contract.COL_SEQUENTIAL + \" = \" +\r\n                \"AU.\" + Audit.Contract.COL_SEQUENTIAL + \";\";\r\n    }\r\n}`\r\n\r\nThe view is \"well-formed\". I tested the view created by CPOrm accesing through the adb shell.\r\n\r\nUsing\r\n`compile 'za.co.cporm:CPOrm:3.0.6'`\r\n\r\nAnd I tried the annotations from a previous issue you closed.\r\n\r\nThanks for your help.\r\n"},"comment":{"url":"https://api.github.com/repos/Wackymax/CPOrm/issues/comments/302080596","html_url":"https://github.com/Wackymax/CPOrm/issues/13#issuecomment-302080596","issue_url":"https://api.github.com/repos/Wackymax/CPOrm/issues/13","id":302080596,"user":{"login":"Wackymax","id":11558269,"avatar_url":"https://avatars3.githubusercontent.com/u/11558269?v=3","gravatar_id":"","url":"https://api.github.com/users/Wackymax","html_url":"https://github.com/Wackymax","followers_url":"https://api.github.com/users/Wackymax/followers","following_url":"https://api.github.com/users/Wackymax/following{/other_user}","gists_url":"https://api.github.com/users/Wackymax/gists{/gist_id}","starred_url":"https://api.github.com/users/Wackymax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wackymax/subscriptions","organizations_url":"https://api.github.com/users/Wackymax/orgs","repos_url":"https://api.github.com/users/Wackymax/repos","events_url":"https://api.github.com/users/Wackymax/events{/privacy}","received_events_url":"https://api.github.com/users/Wackymax/received_events","type":"User","site_admin":false},"created_at":"2017-05-17T12:53:05Z","updated_at":"2017-05-17T12:53:05Z","body":"Hi otsenreDC,\r\n\r\nApologies for the delay in my reply. I've been a bit busy.  Happy you managed to get it working however!  Hope the ORM treats you well :)"}}
{"actor":{"display_login":"Wackymax"}}