Skip to content

Instantly share code, notes, and snippets.

@Raouf25
Last active April 14, 2020 23:33
Show Gist options
  • Save Raouf25/1dec375af218dc9013658972a11e1f14 to your computer and use it in GitHub Desktop.
Save Raouf25/1dec375af218dc9013658972a11e1f14 to your computer and use it in GitHub Desktop.
public interface CarRepository extends JpaRepository<Car, Long> {
List<Car> findByManufacturer(String manufacturer, Pageable pageable);
List<Car> findByModel(String model, Pageable pageable);
List<Car> findByManufacturerAndModel(String manufacturer, String model, Pageable pageable);
// other combinations omitted for sanity
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment