sqlresultsetmapping

Reading from multiple tables and populating multiple entities using JPA SqlResultSetMapping

I have been building a JSF application using JPA to access the DB. There are a number of entities. I want to create a search results screen that shows columns from more than one entity in a table. These entities do not have foreign key relationships. To achieve this I have used a EnttityManager.createNativeQuery and specified an Entity...

Result set mapping in Grails / GORM

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