• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 939
  • Last Modified:

call view through hibernate using jpa annotations

I need to call database view through hibernate using jpa annotations
0
Rocking
Asked:
Rocking
1 Solution
 
Jim CakalicSenior Developer/ArchitectCommented:
Use the NamedNativeQuery annotation with a SQLResultSetMapping annotation if necessary to map the returned columns to your object. See the page below for examples. Plenty more if you google the two annotations.
    http://en.wikibooks.org/wiki/Java_Persistence/Querying#Native_SQL_Queries

Regards,
Jim
0

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now