|
|
Re: Named Query not found [message #905003 is a reply to message #904480] |
Wed, 29 August 2012 14:42 |
|
In general you should not use the EclipseLink Mapping Workbench for JPA, it is for EclipseLink's native ORM. For JPA you should use tools such as EclipseLink JPA (Dali).
It is possible to use a sessions.xml generated by the EclipseLink Mapping Workbench, but this is more for backward compatibility for users migrating from the EclipseLink native ORM.
For the native ORM named queries are defined on the descriptor (per class), but for JPA they need to be defined on the Session, this may be why your query is not found.
There is a persistence unit property you can set to copy all of the descriptor queries to the session (you must ensure they have unique names).
"eclipselink.session.include.descriptor.queries"="true"
James : Wiki : Book : Blog : Twitter
|
|
|
Powered by
FUDForum. Page generated in 0.02918 seconds