Here is our database that contains residence information about clients:
| id | city | address | name |
|---|---|---|---|
| 1 | New York | 35, Park Ave | Sally |
| 2 | Atlanta |
11, Madison Ave |
Darren |
| 3 | Philadelphia |
591, Forbes St |
John |
| 4 | Washington |
73, Russell St |
Nicholas |
| 5 | Atlanta |
128, Patrice Ave |
Kate |
| 6 | Cansas City |
92, William St |
Benjamin |
| 7 | Phoenix |
60, Hazelwood St |
Leonard |
We have declared a method findByCities to get a list of clients by a specific cities:
public interface ClientRepository extends CrudRepository<Client, Long> {
@Query("SELECT n FROM News n WHERE n.city IN :citiesList")
List<Client> findByCities(@Param("citiesList")List<String> cities, Sort sort);
}
After calling this method, we got the following list of clients:
| 6 | Cansas City |
92, William St |
Benjamin |
| 2 | Atlanta |
11, Madison Ave |
Darren |
| 5 | Atlanta |
128, Patrice Ave |
Kate |
Which of the following calls are correct?