[
https://issues.apache.org/jira/browse/GROOVY-7692?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Paul King closed GROOVY-7692.
-----------------------------
Resolution: Won't Fix
No-one has put together a proposal to go ahead with supporting this, so I'll
close for now. If someone wants to work on it, we can always reopen.
> 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
> Priority: Major
>
> 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
(v8.20.10#820010)