matches and highly nested queries issue

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • 2.4.4
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      I have a user embedding one profile, embedding one stats, embedding many jobs. Pretty nested I know.

      This query:

      User.where(
      "profile.stats.jobs".to_sym.matches => {
      :rating.gte => 1,
      :status => "approved"
      })

      Spits:

      TypeError: keys must be strings or symbols
      from /gems/bson-1.4.0/lib/bson/bson_c.rb:24:in `serialize'

      The very same query works whenever I remove :rating.gte => 1, which identifies the problem.

      Thanks,

      Ben

              Assignee:
              Unassigned
              Reporter:
              apneadiving
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: