Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-1201

shell support for UUID (binary subtype 3)

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: JavaScript
    • Labels:
      None
    • Environment:
      Any
    • Backwards Compatibility:
      Fully Compatible

      Description

      Native support for GUID's would be nice. Right now ObjectId's are the only (native) way to manage unique identifiers. But in some projects ot may not be possible to use ObjectId's - either due to legacy code or other constrains.

      My pet reason for not using ObjectId's is that they leak persistency concerns into my domain entities. By using GUID's I avoid making the code dependent directly on a class defined by MongoDB (using the Norm C# driver).

      It is possible to use GUID's but they are stored as binary blobs and as such one cannot read and use the values through the shell while debugging.

        Issue Links

          Activity

          Hide
          samkass Sam Kass added a comment -

          Any chance the UUID-specific shell stuff could get accepted into the next Mongo baseline version? UUID handling is currently awful in the shell and it's a relatively widely-used data type...

          Show
          samkass Sam Kass added a comment - Any chance the UUID-specific shell stuff could get accepted into the next Mongo baseline version? UUID handling is currently awful in the shell and it's a relatively widely-used data type...
          Hide
          dnevil Daris A Nevil added a comment -

          I would be happy to split out the UUID-specific code in order to push it into the main branch.

          Show
          dnevil Daris A Nevil added a comment - I would be happy to split out the UUID-specific code in order to push it into the main branch.
          Hide
          eliot Eliot Horowitz added a comment -

          Is there a clean commit that adds the needed code?

          Show
          eliot Eliot Horowitz added a comment - Is there a clean commit that adds the needed code?
          Hide
          vboivie Victor Boivie added a comment -

          I have made a github pull request at https://github.com/mongodb/mongo/pull/72 that at least displays the uuid bindata better.

          Show
          vboivie Victor Boivie added a comment - I have made a github pull request at https://github.com/mongodb/mongo/pull/72 that at least displays the uuid bindata better.
          Hide
          caleb.jones@disney.com Caleb Jones added a comment -

          This is causing us some pain as we switched our UUIDs over to use BinData() from string values when our tests showed a 15-25% improvement in index size as collection sizes approached 10 million documents. It becomes a pain when trying to poke around in the MongoShell when all we see back is BinData(3,"BASE64").

          Show
          caleb.jones@disney.com Caleb Jones added a comment - This is causing us some pain as we switched our UUIDs over to use BinData() from string values when our tests showed a 15-25% improvement in index size as collection sizes approached 10 million documents. It becomes a pain when trying to poke around in the MongoShell when all we see back is BinData(3,"BASE64").

            People

            • Votes:
              6 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: