Package io.micronaut.data.annotation
Annotation Interface Insert
Lifecycle annotation for repository methods which perform insert operations.
The Insert
annotation indicates that the annotated repository method adds the state of one or more
entities to the database.
An Insert
method accepts an instance or instances of an entity class. The method must have exactly one
parameter whose type is either:
- the class of the entity to be inserted, or
List<E>
orE[]
whereE
is the class of the entities to be inserted.
The annotated method must either be declared void
, or have a return type that is the same as the type of
its parameter.