:pk is mentioned, but not supported

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 12_01_17
    • Affects Version/s: 1.12
    • Component/s: Public API
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      From the documentation linked from the Mongo web site, this should work:

      class PKFactory
      def create_pk(doc)
      return doc if doc[:_id] or doc['_id']
      doc[:_id] ||= SecureRandom::uuid()
      doc
      end
      end

      db = Mongo::MongoClient.from_uri(uri).db(database, pk: PKFactory.new)

      However, it does not.

              Assignee:
              Emily Stolfo (Inactive)
              Reporter:
              Michael Graff
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: