toplink 中 JPA 中的字符串函数 (OAS 10.1.3.n)
我正在尝试以下查询:
SELECT DISTINCT SUBSTRING(c.name, 1, 1) FROM Country c
再次与 Oracle Application Server 10.1.3.3 捆绑在一起的 toplink 但出现错误:
SUBSTRING token not recognize
问题是,toplink 没有 10.1.3.n支持字符串函数吗? (我确定它是JPA1.0,不是吗? 根据 v1.0 规范,应该支持 SUBSTRING,那么为什么 toplink 10.1.3.n 不包含它呢?
谢谢。
I am trying the following query:
SELECT DISTINCT SUBSTRING(c.name, 1, 1) FROM Country c
againest toplink that is bundled with Oracle Application Server 10.1.3.3 but I got an error saying:
SUBSTRING token not recognized
The question is, doesn't toplink 10.1.3.n support string functions? (I am sure it is JPA1.0, ain't it?
According to the v1.0 specs, SUBSTRING should be supported, so why toplink 10.1.3.n doesn't include it?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
JPA 1.0 不支持在 JPQL 查询的 select 子句中包含函数。升级到 TopLink 11.1.1.3.0 将提供 JPA 2.0 功能并支持 JPQL select 子句中的函数。
您始终可以发出本机 SQL 或在 TopLink 10.1.3.3 中使用 TopLink ReportQuery
Having functions within the select clause of a JPQL query was not supported by JPA 1.0. Upgrading to TopLink 11.1.1.3.0 will provide JPA 2.0 functionality and support for functions in the JPQL select clause.
You can always issue native SQL or use a TopLink ReportQuery in TopLink 10.1.3.3