Interface MutationQuery

All Superinterfaces:
CommonQueryContract, Query, Statement
All Known Subinterfaces:
MutationQueryImplementor<T>, NativeQuery<T>, NativeQueryImplementor<R>

@Incubating public interface MutationQuery extends CommonQueryContract, Statement
Within the context of an active session, an instance of this type represents an executable mutation query, that is, an insert, update, or delete. This interface extends the JPA-defined Statement interface, adding additional operations.

A MutationQuery may be obtained from the Session by calling:

A MutationQuery controls how the mutation query is executed, and allows arguments to be bound to its parameters.

session.createStatement("delete Draft where lastUpdated < local date - ?1 year")
        .setParameter(1, years)
        .executeUpdate();
Since:
6.0
See Also: