I have a Java project and a MongoDB database. I use Morphia to query data. I need to order these data based on one field which may start with lowercase or uppercase letters (or even digits or symbols but it is not relevant here). My problem is that Morphia seems to order them based on their ASCII/Unicode value, so I get first all the lowercase rows and then all the uppercase rows. Is there a way to tell Morphia to ignore case during sorting ?
My (simplified) code so far :
Query<MyObject> query = store.query(MyObject.class);
query = query.field("myfield").equal("some value");
query.order("myfield");
query.asList();