1

Using the code below:

Query query = newJdoQuery();
query.setFilter("identifier.matches('partner|account')");
query.execute();

yields no result. Why?

enter image description here

However, replacing the regex part with 'partner'. The query yields 1 result. Replacing it with 'account' yields another 6 results. Have a look at the image below.

enter image description here enter image description here

paul
  • 372
  • 4
  • 17
  • What DN version are you using? I have problems with MATCH in DN 2.1 (BUG): https://stackoverflow.com/questions/20142608/jdoql-datanucleus-filtering-using-string-matches (had to use a workaround, with a much larger and complex expression to overcome the non use of MATCHES. – marcolopes Jul 29 '19 at 16:41
  • 1
    @marcolopes Yea, had to use a workaround for this. The javax.jdo version I'm using is 3.1. I have several dn dependencies in this project and the dn-api-jdo is 4.1.1 and the dn-jdo-query is 4.0.5, other dn is 4.1.x. – paul Jul 30 '19 at 03:12
  • Strange it's not fixed in 3.x or even 4.x! I reported that BUG in DN 2.x! Well... i reported other behaviors that broke compatibility with DN 2.1 and more recent versions, but no one listened to me... so... i'm still stuck with DN 2.1. – marcolopes Sep 28 '19 at 03:23

0 Answers0