Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Toplink JPA and stored procedure or function .

 
Vesko Jel
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried to execute following named query


calling my oracle hash function in where clause , but this doesn't work. What are the limitations of JPQL ?
 
James Sutherland
Ranch Hand
Posts: 553
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JPQL does not support the hash function, it only supports a limited set of common database functions.

You can either use a native SQL query, or use a TopLink Expression query, Expression allow the getFunction() call to add a user defined function, they also support many additional database functions not supported in JPQL and allow user defined ExpressionOperators and mixing of SQL with Expression critieria.

 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!