MorphiaOrg / MorphiaOrg/morphia

`MergingDocument` should override the equals method

Open
#3,735 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
1.7k
Forks
449
Avg merge
7m
Merged PRs (30d)
10

Description

Is your feature request related to a problem? Please describe.
MergingDocument should override the equals method

Describe the solution you'd like
add following code to MergingDocument

        @Override
        public boolean equals(Object o) {
            if (this == o) {
                return true;
            } else if (o instanceof Document document) {
                return this.entrySet().equals(document.entrySet());
            } else {
                return false;
            }
        }

Describe alternatives you've considered

Additional context

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

Locate the MergingDocument class and inspect how Document equality is currently handled. Add the requested equals override, then check the existing test structure for document comparisons and verify that MergingDocument and equivalent Document instances compare as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.