this is a bit tricky.. how do you do a regex query on the ObjectId field?
i'm using the java api, so this is what i have so far
BasicDBObject q = new BasicDBObject()
q.put(field, Pattern.compile(value, Pattern.CASE_INSENSITIVE));
this works fine for any regular field. but doesn't seem to work with ObjectId field. which i assume is because i can't compare an ObjectId to a string? and i can't exactly just put a partial id or a regex into a new ObjectId. it'll just throw an error.
any ideas on this? i'm trying to give users a way to enter part of an id, and be able to get back all documents with that pattern.
thanks in advance!