{"action":"created","issue":{"url":"https://api.github.com/repos/grails/grails-core/issues/9429","repository_url":"https://api.github.com/repos/grails/grails-core","labels_url":"https://api.github.com/repos/grails/grails-core/issues/9429/labels{/name}","comments_url":"https://api.github.com/repos/grails/grails-core/issues/9429/comments","events_url":"https://api.github.com/repos/grails/grails-core/issues/9429/events","html_url":"https://github.com/grails/grails-core/issues/9429","id":118024585,"number":9429,"title":"NPE GrailsDomcainClassPersistentEntity getRootEntity","user":{"login":"oshwardo","id":5483931,"avatar_url":"https://avatars.githubusercontent.com/u/5483931?v=3","gravatar_id":"","url":"https://api.github.com/users/oshwardo","html_url":"https://github.com/oshwardo","followers_url":"https://api.github.com/users/oshwardo/followers","following_url":"https://api.github.com/users/oshwardo/following{/other_user}","gists_url":"https://api.github.com/users/oshwardo/gists{/gist_id}","starred_url":"https://api.github.com/users/oshwardo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oshwardo/subscriptions","organizations_url":"https://api.github.com/users/oshwardo/orgs","repos_url":"https://api.github.com/users/oshwardo/repos","events_url":"https://api.github.com/users/oshwardo/events{/privacy}","received_events_url":"https://api.github.com/users/oshwardo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/grails/grails-core/labels/Blocker","name":"Blocker","color":"e11d21"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/grails/grails-core/milestones/146","html_url":"https://github.com/grails/grails-core/milestones/grails-3.1-M3","labels_url":"https://api.github.com/repos/grails/grails-core/milestones/146/labels","id":1355233,"number":146,"title":"grails-3.1-M3","description":"","creator":{"login":"graemerocher","id":66626,"avatar_url":"https://avatars.githubusercontent.com/u/66626?v=3","gravatar_id":"","url":"https://api.github.com/users/graemerocher","html_url":"https://github.com/graemerocher","followers_url":"https://api.github.com/users/graemerocher/followers","following_url":"https://api.github.com/users/graemerocher/following{/other_user}","gists_url":"https://api.github.com/users/graemerocher/gists{/gist_id}","starred_url":"https://api.github.com/users/graemerocher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graemerocher/subscriptions","organizations_url":"https://api.github.com/users/graemerocher/orgs","repos_url":"https://api.github.com/users/graemerocher/repos","events_url":"https://api.github.com/users/graemerocher/events{/privacy}","received_events_url":"https://api.github.com/users/graemerocher/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":13,"state":"closed","created_at":"2015-10-14T12:10:57Z","updated_at":"2015-12-03T10:12:27Z","due_on":null,"closed_at":"2015-12-03T10:12:27Z"},"comments":1,"created_at":"2015-11-20T11:48:55Z","updated_at":"2016-03-08T14:38:11Z","closed_at":"2015-11-30T09:20:32Z","body":"Grails 3.0.9\r\n\r\nThe method GrailsDomainClassPersistentEntity.getRootEntity has a NPE when the parent extends a non 'hibernate' entity class, i.e. a base class.  For example:\r\n\r\nAnimal extends BaseClass\r\nCat extends Animal\r\n\r\nWhere BaseClass is not an entity in the DB\r\n\r\nIts an easy fix:\r\nwhile (!parent.isRoot()) \r\nshould be changed to:\r\nwhile (!parent.isRoot() && parent.getParentEntity() != null)\r\n\r\nSo that the logic matches that at the start of the method where the null is checked."},"comment":{"url":"https://api.github.com/repos/grails/grails-core/issues/comments/193806806","html_url":"https://github.com/grails/grails-core/issues/9429#issuecomment-193806806","issue_url":"https://api.github.com/repos/grails/grails-core/issues/9429","id":193806806,"user":{"login":"oshwardo","id":5483931,"avatar_url":"https://avatars.githubusercontent.com/u/5483931?v=3","gravatar_id":"","url":"https://api.github.com/users/oshwardo","html_url":"https://github.com/oshwardo","followers_url":"https://api.github.com/users/oshwardo/followers","following_url":"https://api.github.com/users/oshwardo/following{/other_user}","gists_url":"https://api.github.com/users/oshwardo/gists{/gist_id}","starred_url":"https://api.github.com/users/oshwardo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oshwardo/subscriptions","organizations_url":"https://api.github.com/users/oshwardo/orgs","repos_url":"https://api.github.com/users/oshwardo/repos","events_url":"https://api.github.com/users/oshwardo/events{/privacy}","received_events_url":"https://api.github.com/users/oshwardo/received_events","type":"User","site_admin":false},"created_at":"2016-03-08T14:38:11Z","updated_at":"2016-03-08T14:38:11Z","body":"Could this fix be applied to a branch/release that is compatible with the grails 3.0 series, because we are unable to upgrade to 3.1 because of the non support of a hibernate model defined in java classes and not pure gorm."}}