写&调用JPQL中的用户定义函数? [英] Write & Call user-defined function in JPQL?
本文介绍了写&调用JPQL中的用户定义函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以写&调用JPQL中的用户定义函数?
Is it possible to write & call user-defined function in JPQL?
推荐答案
JPA规范本身不支持它,但是,某些JPA实现可能会提供这种扩展.
It's not supported by JPA specification itself, however, some JPA implementations may provide such an extension.
例如,在Hibernate中,您可以将 Dialect
并通过调用registerFunction()
定义海关SQL函数.这样已经定义了许多特定于方言的功能.
For example, in Hibernate you can subclass a Dialect
and define customs SQL functions by calling registerFunction()
. Many dialect-specific functions are already defined this way.
这篇关于写&调用JPQL中的用户定义函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文