Search code examples
jdo

JDO support for "like" operator


I am learning JDO. I am using it with an sql database. I see no example talking about the common sql "like" operator. It seems there is no "like operator for compatibility with non sql databases. I need it. How can I do with JDO?

I add that I am using Datanucleus version 4 as JDO implementation because I am using Apache Isis. It seems that "matches" is implemented only in version 5.


Solution

  • JDOQL supports methods on objects, and follows Java syntax. Consequently it supports String.matches, providing regular expression matching. See the JDO spec and this link in the DataNucleus docs