Query example:
String nativeQuery = "db.Poem.findOne({ 'author' : { '$regex' : '/^Oscar/' }})";
It will compile but won't give any results. I think it is because the regular expression is passed as text and not as matching pattern.