Package io.micronaut.data.annotation
Annotation Interface Find
Annotates a repository method returning entities as a parameter-based automatic query method.
The Find
annotation indicates that the annotated repository method executes a query to retrieve entities
based on its parameters and on the arguments assigned to its parameters. The method return type identifies the entity
type returned by the query. Each parameter of the annotated method must either:
- have exactly the same type and name (the parameter name in the Java source, or a name assigned by
@By
) as a persistent field or property of the entity class, or
The query is inferred from the method parameters which match persistent fields of the entity.
There is no specific naming convention for methods annotated with @Find
; they may be named arbitrarily,
and their names do not carry any semantic meaning defined by the Jakarta Data specification.