Skip to content

Commit ef6e8be

Browse files
committed
go with List rather than Iterable because Iterable is just a PITA to deal with
1 parent 18973f9 commit ef6e8be

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

api/src/main/java/jakarta/data/repository/Delete.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
* to be deleted is the primary entity type of the repository. The method return type must be {@code void}, {@code int},
6666
* or {@code long}. Every parameter of the annotated method must have exactly the same name (the parameter name in the
6767
* Java source, or a name assigned by {@link By @By}) as a persistent field or property of the entity class and be of
68-
* type {@code T}, {@code T[]}, or {@code Iterable<T>} where {@code T} is the type of the field or property. Parameters
68+
* type {@code T}, {@code T[]}, or {@code List<T>} where {@code T} is the type of the field or property. Parameters
6969
* of type {@code Sort}, {@code Order}, {@code Limit}, and {@code PageRequest} are prohibited.
7070
* </p>
7171
* <p>For example, consider an interface representing a garage:</p>

api/src/main/java/jakarta/data/repository/Find.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
* </p>
3535
* <ul>
3636
* <li>have exactly the name (the parameter name in the Java source, or a name assigned by {@link By @By}) as a
37-
* persistent field or property of the entity class and be of type {@code T}, {@code T[]}, or {@code Iterable<T>}
38-
* where {@code T} is the type of the field or property, or</li>
37+
* persistent field or property of the entity class and be of type {@code T}, {@code T[]}, or {@code List<T>} where
38+
* {@code T} is the type of the field or property, or</li>
3939
* <li>be of type {@link jakarta.data.Limit}, {@link jakarta.data.Sort}, {@link jakarta.data.Order}, or
4040
* {@link jakarta.data.page.PageRequest}.</li>
4141
* </ul>

spec/src/main/asciidoc/repository.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ Each automatic query method must be assigned an entity type. The rules for infer
831831

832832
Jakarta Data infers a query based on the parameters of the method. Each parameter must either:
833833

834-
- have exactly the same name as a persistent field or property of the entity class and be of type `T`, `T[]`, or `Iterable<T>` where `T` is the type of the field or property, or
834+
- have exactly the same name as a persistent field or property of the entity class and be of type `T`, `T[]`, or `List<T>` where `T` is the type of the field or property, or
835835
- be of type `Limit`, `Order`, `PageRequest`, or `Sort`.
836836

837837
Parameter names map parameters to persistent fields. A repository with parameter-based automatic query methods must either:

0 commit comments

Comments
 (0)