Skip to content

Provide support for conditional delete methods with annotation #1080

@bala-striva

Description

@bala-striva

Is your feature request related to a problem? Please describe.
When using spring boot JpaRepository with custom delete methods i would like to use a javers annotation similar to JaversAuditableDelete.

E.g.:

@Repository
class DummyAuditedRepository {
        List<DummyObject> deleteByName(String name) { ... }
}

Describe the solution you'd like

  • create a new annotation for example JaversAuditableConditionalDelete
  • add AOP handler for the new annotation in JaversAuditableAspect
  • add a new method in JaversCommitAdvice
    ** collect the returned object that it's a collection of entities
    ** handle entity removal similar to commitDeleteMethodArguments by calling commitShallowDelete

Describe alternatives you've considered
Handle the shallow delete calls directly from the caller of the repository without support from javers.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions