Skip to content

Commit

Permalink
Remove hashCode and equals override (#399)
Browse files Browse the repository at this point in the history
Signed-off-by: Etienne Homer <[email protected]>
  • Loading branch information
etiennehomer authored Dec 18, 2023
1 parent 50ef1fd commit bdb618a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,20 +105,4 @@ public ModificationEntity copy() {
return toModificationInfos().toEntity();
}

//From https://vladmihalcea.com/the-best-way-to-map-a-onetomany-association-with-jpa-and-hibernate/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof ModificationEntity)) {
return false;
}
return id != null && id.equals(((ModificationEntity) o).getId());
}

@Override
public int hashCode() {
return getClass().hashCode();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,4 @@ public void update(@NonNull ModificationInfos modificationInfos) {
}
}

@Override
public boolean equals(Object o) {
return super.equals(o);
}

@Override
public int hashCode() {
return super.hashCode();
}
}

0 comments on commit bdb618a

Please sign in to comment.