Meaningless Drivel is fun!*
The moose likes Object Relational Mapping and the fly likes NamedNativeQuery in JPA Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "NamedNativeQuery in JPA" Watch "NamedNativeQuery in JPA" New topic
Author

NamedNativeQuery in JPA

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

How to create a NamedNativeQuery using JPA? I have a file called querries.xml and I want to write a plain SQL query and use it elsewhere. But when I try to start up my application, it throws error saying that the EntityManagerFactory cannot be built and it points me that org.hibernate.hql.ast.QuerySyntaxException: has occured. Any ideas?


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

Any help guys? Does something like that even exists?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: NamedNativeQuery in JPA
 
Similar Threads
Use custom query on JPA
Mapping to an xml typed column (PostgreSQL) on an EJB3 entity in JBoss 5.1
Stored procedures JPA and mappings
@NamedNativeQuery and choosing the correct resultClass
Hibernate second level cache questions