diff --git a/api/src/main/java/jakarta/data/repository/CrudRepository.java b/api/src/main/java/jakarta/data/repository/CrudRepository.java index b11b7c314..c4b841188 100644 --- a/api/src/main/java/jakarta/data/repository/CrudRepository.java +++ b/api/src/main/java/jakarta/data/repository/CrudRepository.java @@ -145,6 +145,7 @@ public interface CrudRepository extends BasicRepository { * the update.

* * @param entity the entity to update. Must not be {@code null}. + * @param Type of the entity to update. * @return an updated entity instance including all automatically generated values, * updated versions, and incremented values which changed as a result of the update. * @throws OptimisticLockingFailureException the entity is not found in the database @@ -152,7 +153,7 @@ public interface CrudRepository extends BasicRepository { * @throws NullPointerException if the entity is null. */ @Update - T update(T entity); + S update(S entity); /** *

Modifies entities that already exist in the database.

@@ -167,6 +168,7 @@ public interface CrudRepository extends BasicRepository { * the update.

* * @param entities entities to update. + * @param Type of the entities to update. * @return updated entity instances, in the same order as the supplied entities, * and including all automatically generated values, updated versions, and * incremented values which changed as a result of the update. @@ -175,6 +177,6 @@ public interface CrudRepository extends BasicRepository { * @throws NullPointerException if either the supplied {@code Iterable} is null or any element is null. */ @Update - Iterable updateAll(Iterable entities); + Iterable updateAll(Iterable entities); }