{"action":"closed","issue":{"url":"https://api.github.com/repos/grails/grails-core/issues/9446","labels_url":"https://api.github.com/repos/grails/grails-core/issues/9446/labels{/name}","comments_url":"https://api.github.com/repos/grails/grails-core/issues/9446/comments","events_url":"https://api.github.com/repos/grails/grails-core/issues/9446/events","html_url":"https://github.com/grails/grails-core/issues/9446","id":119064245,"number":9446,"title":"Error parsing GroovyRowResult to Domain (Grails 3.0.9)","user":{"login":"danielsamper","id":16034709,"avatar_url":"https://avatars.githubusercontent.com/u/16034709?v=3","gravatar_id":"","url":"https://api.github.com/users/danielsamper","html_url":"https://github.com/danielsamper","followers_url":"https://api.github.com/users/danielsamper/followers","following_url":"https://api.github.com/users/danielsamper/following{/other_user}","gists_url":"https://api.github.com/users/danielsamper/gists{/gist_id}","starred_url":"https://api.github.com/users/danielsamper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielsamper/subscriptions","organizations_url":"https://api.github.com/users/danielsamper/orgs","repos_url":"https://api.github.com/users/danielsamper/repos","events_url":"https://api.github.com/users/danielsamper/events{/privacy}","received_events_url":"https://api.github.com/users/danielsamper/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/grails/grails-core/labels/Won't%20Fix","name":"Won't Fix","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-26T15:28:07Z","updated_at":"2015-11-26T20:56:41Z","closed_at":"2015-11-26T20:56:41Z","body":"When we do a parse from GroovyRowResult class to a domain class (Cuser in the example below) only columns with the same name in database and domain are parsed. For example:\r\n\r\n- Domain field 'name' -> Database column 'name' -> Parsed successfully\r\n- Domain field 'photoId' -> Database column 'photo_id' -> Not parsed (null value)\r\n\r\n        Sql sql = new Sql(dataSource)\r\n\r\n        List<GroovyRowResult> candidates = sql.rows(\"{call bestCandidatesForClientSelection(?,?,?,?,?,?,?)}\", [cuser.id, task.tasktype.id, task.id, task.latitude, task.longitude, 12, 5])\r\n\r\n        candidates.each { candidate ->\r\n            result.add(new Cuser(candidate ))\r\n        }\r\n\r\n"}}