arangodb / arangodb/spring-data

Delete all edges on deleting a document

Open
#239 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
116
Forks
57
PR merge metrics
No merged PRs in 30d

Description

@Document
public class User {
    @Id
    private String id;
     
    private String name;
}

@Edge
public class Friend {
    @Id
    private String id;

    @From
    private User user1;

    @To
    private User user2;
}

public interface UsersRepository extends ArangoRepository<User, String> {
}

On deleting user to delete also all edges

userRepository.deleteById("some-id");

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at UsersRepository.deleteById("some-id") and trace how deleting the User document handles the @Edge Friend relationships shown in the issue. Verify the behavior with a User and Friend example, and consider the work complete when deleting a user also removes all associated edges without leaving dangling relationships.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
database
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.