• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

@QueryHint

 
Ranch Hand
Posts: 856
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
in my Entity-

--------------------------
@NamedQuery(
name="findAllEmployees",
query="SELECT * FROM EMPLOYEE WHERE MGR=1",
hints={
@QueryHint (name=TopLinkQueryHints.BIND_PARAMETERS, value=HintValues.PERSISTENCE_UNIT_DEFAULT)
}
)
----------------------------

I am unable to resolve the @QueryHint annotation. Even though i included the jar file's
------------------
import oracle.toplink.essentials.config.HintValues;
import oracle.toplink.essentials.config.TopLinkQueryHints;
-----------------

but still it's unresolveable.

Also i am doubtful about it's syntax usage.
I have included all Oracle TopLink jar file's.

I want to know about correct jar file and syntax required for @QueryHint.

This link http://download.oracle.com/docs/cd/B32110_01/web.1013/b28221/ent30qry003.htm wasn't useful for me.
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check the J2EE API, QueryHint is in the javax.persistence package.
 
Amandeep Singh
Ranch Hand
Posts: 856
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got it, it is present here

javax.persistence.QueryHint;

and this is the correct systax usage-

@NamedQuery(name="findCar",
query = "select c from Car c where c.steering like :steering",
hints = {@QueryHint (name= "toplink.jdbc.timeout", value = "10")}
)

thanks Christophe...
 
Whatever you say buddy! And I believe this tiny ad too:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic