Skip to content

Commit 6c91c0c

Browse files
committed
add a couple of extra tests for Jakarta Data
Signed-off-by: Gavin King <[email protected]>
1 parent dd7aa94 commit 6c91c0c

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

tooling/metamodel-generator/src/jakartaData/java/org/hibernate/processor/test/data/eg/Bookshop.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,13 @@ public interface Bookshop extends CrudRepository<Book,String> {
2424

2525
@Query("select count(this) where this.title like ?1 order by this.isbn")
2626
long count2(String title);
27+
28+
@Query("where isbn in :isbns and type = Book")
29+
List<Book> books(List<String> isbns);
30+
31+
@Query("delete from Book where type = org.hibernate.processor.test.data.eg.Type.Book")
32+
long deleteAllBooks();
33+
34+
@Query("delete from Book where type = Book and isbn in ?1")
35+
int deleteBooks(List<String> isbns);
2736
}

tooling/metamodel-generator/src/jakartaData/java/org/hibernate/processor/test/data/eg/Library.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ record BookWithAuthor(Book book, Author author) {}
8888
@Delete
8989
void delete(Publisher publisher);
9090

91+
@Update
92+
void updateAll(Publisher... publishers);
93+
9194
@Find
9295
@OrderBy("isbn")
9396
CursoredPage<Book> allBooks(PageRequest<Book> pageRequest);

0 commit comments

Comments
 (0)