GridFsFile should expose data keys as constants

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.6.5
    • Component/s: API
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      GridFsFile currently uses hard-coded field names to store the metadata information (filename, content length etc.). To query documents in turn one has to know those field names and thus look into the implementation. It would be cool if the default metadata field names would be exposed via public constants so that one can build a query like this:

      new BasicDBObject(GridFsFile.CONTENT_TYPE, "application/xml");
      

            Assignee:
            Ross Lawley
            Reporter:
            Oliver Gierke
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: