From 3ca494be794364f925946be871e8906b920b8477 Mon Sep 17 00:00:00 2001 From: Gavin King Date: Fri, 1 Mar 2024 12:04:55 +0100 Subject: [PATCH] HHH-17772 allow array as return type for @Find methods add tests --- .../src/test/java/org/hibernate/jpamodelgen/test/dao/Dao.java | 3 +++ .../hibernate/jpamodelgen/test/data/BookAuthorRepository.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/dao/Dao.java b/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/dao/Dao.java index 97c9d15ea9..4552da1d80 100644 --- a/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/dao/Dao.java +++ b/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/dao/Dao.java @@ -109,6 +109,9 @@ public interface Dao { @Find List beansForText(String text); + @Find + Bean[] beansAsArray(String text); + @HQL("where isbn = ?1") List sortedBooksForIsbn(String isbn, Order... order); diff --git a/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/data/BookAuthorRepository.java b/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/data/BookAuthorRepository.java index a1e86f96c8..a984b1f429 100644 --- a/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/data/BookAuthorRepository.java +++ b/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/data/BookAuthorRepository.java @@ -66,6 +66,9 @@ public interface BookAuthorRepository { @Find List byPubDate3(LocalDate publicationDate, Sort... order); + @Find + Book[] bookArrayByTitle(String title); + @Insert void create(Book book);