Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
MongoDB Java Morphia case insensitive criteria query?
+1
−0
So I googled some on how to make a case insensitive criteria query but could not find the solution very easily. So I basically have code that looks like this:
...
query.criteria("fieldName").contains("regex"),
...
And I want to make it ignore case, how do I do it?
1 answer
+1
−0
I realized myself what I should do:
...
query.criteria("fieldName").containsIgnoreCase("regex"),
...
Also mentioned here:
https://github.com/MorphiaOrg/morphia/issues/832
0 comment threads