Solved

call view through hibernate using jpa annotations

Posted on 2011-03-10
1
917 Views
Last Modified: 2012-05-11
I need to call database view through hibernate using jpa annotations
0
Comment
Question by:Rocking
1 Comment
 
LVL 19

Accepted Solution

by:
Jim Cakalic earned 50 total points
ID: 35172348
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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
jboss wildfly 10.1 10 405
login form jsp example 2 49
Forms that calculate points for wordpress 10 83
spring maven example issues 3 38
In this post we will learn different types of Android Layout and some basics of an Android App.
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question