Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-2116

Moped::Errors::QueryFailure when I use early loading in Cells

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

      for example:

      class TopicsCell < Cell::Rails
        def hot_sections
          @sections= Section.all.includes(:nodes)
          render
        end
      end
      

      This code will raise Moped::Errors::QueryFailure error.

      The operation: #<Moped::Protocol::Query
        @length=80
        @request_id=129
        @response_to=0
        @op_code=2004
        @flags=[:slave_ok]
        @full_collection_name="ruby_china_dev.nodes"
        @skip=0
        @limit=0
        @selector={"section_id"=>{"$in"=>0}}
        @fields=nil>
      failed with error 12580: "invalid query"
      
      See https://github.com/mongodb/mongo/blob/master/docs/errors.md
      for details about this error.
      
      
      1: <div id="sections" class="box">
      2:     <h2><%= t("common.index_node_navigation")%></h2>
      3:     <ul>
      4:         <% @sections.each do |section| %>
      5:         <li>
      6:             <label><%= section.name %></label>
      7:             <span class="nodes">
      

            Assignee:
            durran Durran Jordan
            Reporter:
            huacnlee@gmail.com Jason Lee
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: