Result set mapping in Grails / GORM
- by armandino
I want to map the result of a native SQL query to a simple bean in grails, similar to what the @SqlResultSetMapping annotation does.
For example, given a query
select x.foo, y.bar, z.baz from //etc...
map the result to
class FooBarBaz {
String foo
String bar
String baz
}
Can anyone provide an example of how to do this in grails?
Thanks in advance.