Package io.micronaut.data.annotation
Annotation Type Where
-
@Retention(RUNTIME) @Target({METHOD,ANNOTATION_TYPE,TYPE}) @Documented @Repeatable(WhereSpecifications.class) @Inherited public @interface Where
ThereWhere
annotation allows augmenting theWHERE
statement of generated queries with additional criterion.- Since:
- 1.0.0
- Author:
- graemerocher
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.String
value
The string value that represents the additional query criterion.
-
-
-
Element Detail
-
value
java.lang.String value
The string value that represents the additional query criterion. For example:enabled = true
Note that if it may be required to specify the query alias in queries. For example:
book_.enabled = true
Parameterized variables can be specified using the dollar syntax:
book_.enabled = ${enabled}
. In this case the parameter must be declared in the method signature a compilation error will occur.Use cases including soft-delete, multi-tenancy etc.
- Returns:
- The additional query criterion.
-
-