add a test and a comment

Signed-off-by: Gavin King <gavin@hibernate.org>
This commit is contained in:
Gavin King 2024-04-06 11:35:09 +02:00 committed by Christian Beikov
parent 594bc89943
commit 42d2f07e03
2 changed files with 6 additions and 1 deletions

View File

@ -1,6 +1,7 @@
package org.hibernate.processor.test.data.eg;
import jakarta.data.repository.BasicRepository;
import jakarta.data.repository.Find;
import jakarta.data.repository.Query;
import jakarta.data.repository.Repository;
@ -10,4 +11,7 @@ import java.util.stream.Stream;
public interface Publishers extends BasicRepository<Publisher,Long> {
@Query(" ")
Stream<Publisher> all();
@Find
Publisher find(Long id);
}

View File

@ -1451,7 +1451,8 @@ public class AnnotationMetaEntity extends AnnotationMeta {
}
else {
if ( containerType != null ) {
// multiple results, it has to be a criteria finder
// multiple results, so it has to be a criteria finder
// or, alternatively, Optional, which for now we treat similarly
createCriteriaFinder( method, declaredType, containerType.toString(), entity );
}
else {