• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Question of using SqlResultSetMapping

 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,

Learning to use Hibernate and JPA. Trying to use CreateNativeQuery in the following way -



But getting org.hibernate.MappingException: Unknown SqlResultSetMapping [testing]

Not sure if the @SqlResultSetMapping or the @NameNativeQuery need to be in the table1 POJO. In that case I would rather create a db table view doing the same above query using UNION of table1 and table2. I thought I could use SqlResultSetMapping to use one of the 2 tables (table1 or table2) class object's common fields (col1, col2 and col3) and assign the resultList values to it.
Is it something else I am missing or not doing right?

Thanks
reply
    Bookmark Topic Watch Topic
  • New Topic