document.to_key returns array instead of string

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Do
    • Priority: Major - P3
    • None
    • Affects Version/s: 8.0.3
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      # Return the key value for the document.
      #
      # @exampleReturn the key.
      # document.to_key
      #
      # @return [ String ] The id of the document or nil if new.
      def to_key
        (persisted? || destroyed?) ? [ _id.to_s ] : nil
      end
      

       

      this eg breaks devise passwordless when find_by(_id: resource.to_key) is called (which works on ActiveRecord resources)

            Assignee:
            Unassigned
            Reporter:
            Andreas Ulrich
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: