Details
-
Task
-
Resolution: Done
-
Major - P3
-
None
-
None
-
None
Description
Document validation can be specified when creating a new collection, see JAVA-2008, but is there a way to retrieve it after the collection has been created?
In mongo Shell this can be easily achieved by running db.getCollectionInfos({name: "MyTestCollection"})[0].options.validator;
What I miss is a similar method on the MongoDatabase class or a Database Command I can run with the MongoDatabase.runCommand(...) method.
If there's currently no way to retrieve that information, would it be possible to turn this question into a feature request?