title: Spring Boot Mongo DB Inheritance
body: <pre><code>Class A{
  public String phone;
  }
  
  @Document
  Class B extends A{
  public String location;
  ///getter and setter
  }
  
  @Repository
  public interface B extends MongoRepository&lt;B, String&gt; {
  
     List&lt;B&gt; findByphone(String wphone);
  
  }
  </code></pre>
  
  <p>When using this findByphone(phone) my api saying this </p>
  
  <p>"status": 500,
      "error": "Internal Server Error",
      "message": "No property 'phone' found on class com.example.demo.model.B! Did you mean: phone,Phone?"</p>