title: Getting null value while using @Query of spring data from mongo
body: <p>I have been querying mongodb using mongorepository and spring data.</p>
  
  <p>My function looks like this:</p>
  
  <pre><code>@Repository
  public interface UserRepository extends MongoRepository&lt;User,String&gt; {
      @Query(value="{'email' : ?0}")
      User findByEmail(String email);
  }
  </code></pre>
  
  <p>My collection in mongodb looks like this</p>
  
  <pre><code>&gt; db.user.find();
  { "_id" : "1", "email" : "abc@gmail.com", "password" : "$2a$12$lDJgMZNLAcxv2J.QTZSjAuWJdPleBxXq.M4aj9itrR1RMDkgmwN7m", "name" : "def", "active" : 1, "isLoacked" : false, "isExpired" : false, "isEnabled" : true, "_class" : "com.x.gateway.auth.User" }
  </code></pre>
  
  <p>It always returns null value. </p>