Query by embedded StringifiedSymbol field does not work

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: 8.1.7
    • Component/s: Query
    • None
    • None
    • Ruby Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      Hi, might be I'm doing something wrong, but I recently upgraded to Mongoid 8.1 and converted Symbol fields to StringifiedSymbol and it seems querying by embedded StringifiedSymbol field does not work:

       

      Model.find('...').embedded_relation.map(&:file_type)

      => [:pdf, :pdf, :pdf]

      Model.find('...').embedded_relation.where(file_type: :pdf).count

      => 0

      Model.find('...').embedded_relation.where(file_type: 'pdf').count

      => 0

      Model.where('embedded_relation.file_type': :pdf, id: '...').first

      => # document found

            Assignee:
            Darshana Venkatesh
            Reporter:
            Marek Stanczyk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: