2

I'm using the .startsWith() filter in a JDOQL query but it's case sensitive. So startsWith("ab") doesn't return "Abc" result and so on.

Will I need to use a SQL query to avoid this ?

DataNucleus
  • 15,497
  • 3
  • 32
  • 37
Jla
  • 11,304
  • 14
  • 61
  • 84

1 Answers1

3

So combine it with toUpperCase() then perhaps field.toUpperCase().startsWith("AB")

Edit : fix method names

DataNucleus
  • 15,497
  • 3
  • 32
  • 37
  • omg why didn't I think of combining like with any extensions methods. I feel really dumb now. The methods name are toUpperCase()/toLowerCase(). Thanks – Jla May 19 '10 at 15:04
  • Simple rule for JDOQL : think how you would express a condition in Java, and then check that all methods and operators are available in JDOQL - they usually are. – DataNucleus May 20 '10 at 12:24