EclipseLink JPA : defining native query in orm.xml
673698Mar 2 2010 — edited Apr 20 2010Hi 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