Annotation Interface Modifying
Indicates a query method should be considered as modifying query as that changes the way it needs to be executed.
This annotation is only considered if used on query methods defined through a Query
annotation. It's not
applied on custom implementation methods or queries derived from the method name as they already have control over
the underlying data access APIs or specify if they are modifying by their name.
Queries that require a `@Modifying` annotation include INSERT
, UPDATE
, DELETE
, and DDL
statements.
- Author:
- Oliver Gierke, Christoph Strobl, Nicolas Cirigliano, Jens Schauder
- See Also:
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionboolean
Defines whether we should clear the underlying persistence context after executing the modifying query.boolean
Defines whether we should flush the underlying persistence context before executing the modifying query.
-
Element Details
-
flushAutomatically
boolean flushAutomaticallyDefines whether we should flush the underlying persistence context before executing the modifying query.- Returns:
- Default:
- false
-
clearAutomatically
boolean clearAutomaticallyDefines whether we should clear the underlying persistence context after executing the modifying query.- Returns:
- Default:
- false
-