Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-871

:pk is mentioned, but not supported

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Gone away
    • Affects Version/s: 1.12
    • Fix Version/s: 12_01_17
    • Component/s: Public API
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            emily.stolfo Emily Stolfo
            Reporter:
            skandragon Michael Graff
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: