JDOQL DATANUCLEUS filtering using String matches

感情迁移 提交于 2019-12-04 19:24:34

After dozens of failed tests, i can say that (with DN 2.1) the MATCHES does not work (tested against JAVA string.matches(regex)): http://www.datanucleus.org/products/accessplatform_2_1/jdo/jdoql_methods.html

In my tests i have the following regex:

(PT)?999999990

Is translated by JDOQL into:

LIKE '(PT)<UNPRINTABLE>999999990'

The database contains many records like:
999999990
PT999999990
...

Also, depending on the REGEX, the JDOQL interpreter seems to change the expression...

The following regex:

(?i)(PT)?999999990 

Translated by JDOQL into:

LIKE '(PT)<UNPRINTABLE>999999990'
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!