Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Toplink JPA and stored procedure or function .  RSS feed

 
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
Boost this thread!