title: Not able to fetch mongodb object with a valid field
body: <p>I'm using Mongoengine.
  When I do a:</p>
  
  <pre><code>&gt;&gt;&gt; Grant.objects().first().client_id
  </code></pre>
  
  <p>The result is as expected.</p>
  
  <pre><code>ObjectId('526fd0da82353536892f22ae')
  </code></pre>
  
  <p>But, when I search based on the <code>client_id</code>,</p>
  
  <p><code>&gt;&gt;&gt; Grant.objects(client_id="526fd0da82353536892f22ae").first()</code> </p>
  
  <p>I get a InvalidQueryError:</p>
  
  <blockquote>
    <p>InvalidQueryError: Cannot resolve field "client_id"
    Here's what my Grant model looks like:</p>
  </blockquote>
  
  <pre><code>class Grant(db.Document):
      #user_id = db.StringField()
      user = db.ReferenceField(User)
      client_id = db.StringField()
      client = db.ReferenceField(Client)
      code = db.StringField()
      redirect_uri = db.StringField()
      expires = db.DateTimeField()
      scopes = db.ListField()
  
      #for soft-deleting the grant
      is_deleted = db.BooleanField(default=False)
  
      @property
      def user_id(self):
          return self.user.id
  
      @property
      def client_id(self):
          return self.client.id
  
      def delete(self):
          self.is_deleted = True
  </code></pre>
  
  <p>Can someone go through this code and point out the problem?</p>