0

How to return just the primary key of the following JPA entity instead of the entire object in findByName method

public interface FooRepository extends JpaRepository<Foo, Long> {

    Optional<Foo> findByName(String name);

}
Rpj
  • 5,348
  • 16
  • 62
  • 122

0 Answers0