Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes 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.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic