[ 
https://issues.apache.org/jira/browse/GROOVY-7692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15080767#comment-15080767
 ] 

Paul King commented on GROOVY-7692:
-----------------------------------

I changed from "bug" to "improvement" since the requested feature has never 
been a supported option previously.

> Error parsing GroovyRowResult to Domain (Groovy 2.4.4)
> ------------------------------------------------------
>
>                 Key: GROOVY-7692
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7692
>             Project: Groovy
>          Issue Type: Improvement
>          Components: SQL processing
>    Affects Versions: 2.4.4
>            Reporter: Daniel Samper
>            Assignee: Paul King
>
> 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:
> Domain field 'name' -> Database column 'name' -> Parsed successfully
> Domain field 'photoId' -> Database column 'photo_id' -> Not parsed (null 
> value)
> {code}
> Sql sql = new Sql(dataSource)
> List<GroovyRowResult> candidates = sql.rows("{call 
> bestCandidatesForClientSelection(?,?,?,?,?,?,?)}", [cuser.id, 
> task.tasktype.id, task.id, task.latitude, task.longitude, 12, 5])
> candidates.each { candidate ->
>     result.add(new Cuser(candidate ))
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to