Search Results

Search found 2 results on 1 pages for 'sqlresultsetmapping'.

Page 1/1 | 1 

  • 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.

    Read the article

  • trying to run a named query

    - by dora
    hi, I’m doing the following: @Entity @SqlResultSetMapping(name="getxxxx", entities=@EntityResult(xxxx.class, fields = { @FieldResult(name="x1", column = "x1"), @FieldResult(name="x2", column = "x2")})) @NamedNativeQuery(name=" getxxxx ", query="select x1, x2 from yyyy", resultSetMapping=" getxxxx ") } )public class xxxx{ . . . public xxxx() { } i get an error: "Table "xxxx" cannot be resolved", the class xxxx is not a table mapped into my source, I’m trying to query the DB and return the results into my class is it possible?

    Read the article

1