title: How to search two or more parameter in java spring?
body: <p>I have got two cars in my database(MySQL). The first is red(String color) Ferrari(String brand) and second is red(String color) Lamborghini(String brand). When I'm looking only after brand for example: "ferrari" the result is all cars which brand is "ferrari". Ok that's good result. But problem is when in the field I enter two parameters or more, for example: brand=ferrari and color=red. Enter. And the result is red Ferrari and red Lamborghini but it should be only red Ferrari because I typed "Ferrari" and "Red". How to return correct result? This is my method from CarRepository.</p>
  
  <pre><code>List&lt;Car&gt; cars = carRepository.findByBrandOrModel(List&lt;String&gt; brands, List&lt;String&gt; models);
  </code></pre>
  
  <p>I don't know how to correct this method. Only I know the "OR" is incorrect. Can anyone help me? <a href="https://i.stack.imgur.com/efQ7D.png" rel="nofollow noreferrer">This is my controller</a></p>
  
  <p><a href="https://i.stack.imgur.com/V0nad.png" rel="nofollow noreferrer">entity</a></p>