Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

EclipseLink JPA : defining native query in orm.xml

673698Mar 2 2010 — edited Apr 20 2010
Hi all,

with TopLink Essentials, I used to define all my queries (both JPQL and Native) in the orm.xml file.

Unfortunately the same syntax doesn't work for me now, I get persistenceUnit errors when I try to invoke the query from my EntityManager: if I define the query inside my java code, everything works.

Has someone of you ever used this feature? If so, could you please post me an example of:

- definition of native query in orm.xml
- invocation of the query from EntityManager (thorugh createNativeQuery I guess)

thank you in advance

MF

P.S.
I'm using OC4J 10.1.3.4
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 18 2010
Added on Mar 2 2010
7 comments
5,820 views