• 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 ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
  • Carey Brown
  • salvin francis
  • Claude Moore

modification is needed for chapter 7's queryHintsExample  RSS feed

Ranch Hand
Posts: 1730
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In chapter 7's queryHintsExample

The second parameter of setHint needs to be modified into:

With ObjectLevelReadQuery.DoNotCheckCache, I got an error:

Caused by: java.lang.IllegalArgumentException: Query SELECT e FROM Employee e WHERE e.id = ?1, query hint eclipselink.cache-usage has illegal value 0.
at org.eclipse.persistence.internal.jpa.QueryHintsHandler$Hint.apply(QueryHintsHandler.java:362)
at org.eclipse.persistence.internal.jpa.QueryHintsHandler$Hint.apply(QueryHintsHandler.java:345) ...

Paper jam tastes about as you would expect. Try some on this tiny ad:
Create Edit Print & Convert PDF Using Free API with Java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!