diff --git a/documentation/spring-integration/index.md b/documentation/spring-integration/index.md index e0fc9e3f..8117134c 100644 --- a/documentation/spring-integration/index.md +++ b/documentation/spring-integration/index.md @@ -251,6 +251,29 @@ It could be a Service, Repository or anything which modifies domain objects. From now, all objects passed to the annotated methods will be automatically versioned by JaVers. +

@JaversAuditableConditionalDelete for any kind of repositories

+ +If you’re using any kind of reposity, and have delete methods with conditions, you can put `@JaversAuditableConditionalDelete` annotation on the methods to audit these events. + +For example: + +```java +@Repository +class UserRepository { + @JaversAuditableConditionalDelete + public User deleteByLogin(String login) { + ...// + } + + @JaversAuditableConditionalDelete + public List deleteAllByLogin(String login) { + ...// + } +} +``` + +These delete methods must return either an Entity or a collection of Entity. +

JPA EntityManager integration

Transaction management is the important issue for applications backed by SQL databases. Generally, all SQL statements executed by `JaversSQLRepository`