Skip to content

Commit

Permalink
Merge pull request #97 from njr-11/3-repository-keyword-for-empty
Browse files Browse the repository at this point in the history
repository keyword for Empty
  • Loading branch information
otaviojava authored Dec 21, 2022
2 parents 118c21a + 4704cfc commit 7267478
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions api/src/main/java/jakarta/data/repository/Repository.java
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,12 @@
* <td>Specifies descending sort order for <code>findBy</code> queries</td>
* <td><code>findByAuthorLastNameOrderByYearPublishedDesc(surname)</code></td></tr>
*
* <tr style="vertical-align: top"><td><code>Empty</code></td>
* <td>collections</td>
* <td>Requires that the entity's attribute is an empty collection or has a null value.</td>
* <td><code>countByPhoneNumbersEmpty()</code>
* <br><code>findByInviteesNotEmpty()</code></td></tr>
*
* <tr style="vertical-align: top"><td><code>EndsWith</code></td>
* <td>strings</td>
* <td>Requires that the characters at the end of the entity's attribute value
Expand Down
4 changes: 4 additions & 0 deletions spec/src/main/asciidoc/repository.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ Jakarta Data implementations often support the following list of predicate keywo
|Find results where the property is between the given values
|findByDateBetween

|Empty
|Find results where the property is an empty collection or has a null value.
|deleteByPendingTasksEmpty

|LessThan
|Find results where the property is less than the given value
|findByAgeLessThan
Expand Down

0 comments on commit 7267478

Please sign in to comment.