add a couple of extra tests for Jakarta Data

Signed-off-by: Gavin King <gavin@hibernate.org>
This commit is contained in:
Gavin King 2024-03-30 15:39:35 +01:00
parent dd7aa947c1
commit 6c91c0c234
2 changed files with 12 additions and 0 deletions

View File

@ -24,4 +24,13 @@ public interface Bookshop extends CrudRepository<Book,String> {
@Query("select count(this) where this.title like ?1 order by this.isbn")
long count2(String title);
@Query("where isbn in :isbns and type = Book")
List<Book> books(List<String> isbns);
@Query("delete from Book where type = org.hibernate.processor.test.data.eg.Type.Book")
long deleteAllBooks();
@Query("delete from Book where type = Book and isbn in ?1")
int deleteBooks(List<String> isbns);
}

View File

@ -88,6 +88,9 @@ public interface Library {
@Delete
void delete(Publisher publisher);
@Update
void updateAll(Publisher... publishers);
@Find
@OrderBy("isbn")
CursoredPage<Book> allBooks(PageRequest<Book> pageRequest);