Skip to content

Commit

Permalink
fix equals methods
Browse files Browse the repository at this point in the history
  • Loading branch information
musab.bozkurt committed Feb 15, 2024
1 parent 2ea8bf8 commit 843a11b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/main/java/com/mb/livedataservice/data/model/ScoreBoard.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.EntityListeners;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.*;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.envers.Audited;
import org.hibernate.proxy.HibernateProxy;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import java.util.Objects;

@Data
@Getter
@Setter
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Entity(name = "score_board")
Expand All @@ -40,7 +40,7 @@ public class ScoreBoard extends BaseEntity {
@Override
public final boolean equals(Object o) {
if (this == o) return true;
if (o == null) return false;
if (o == null || this.getClass() != o.getClass()) return false;
Class<?> oEffectiveClass = o instanceof HibernateProxy hibernateProxy ? hibernateProxy.getHibernateLazyInitializer().getPersistentClass() : o.getClass();
Class<?> thisEffectiveClass = this instanceof HibernateProxy hibernateProxy ? hibernateProxy.getHibernateLazyInitializer().getPersistentClass() : this.getClass();
if (thisEffectiveClass != oEffectiveClass) return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class Tutorial {
@Override
public final boolean equals(Object o) {
if (this == o) return true;
if (o == null) return false;
if (o == null || this.getClass() != o.getClass()) return false;
Class<?> oEffectiveClass = o instanceof HibernateProxy hibernateProxy ? hibernateProxy.getHibernateLazyInitializer().getPersistentClass() : o.getClass();
Class<?> thisEffectiveClass = this instanceof HibernateProxy hibernateProxy ? hibernateProxy.getHibernateLazyInitializer().getPersistentClass() : this.getClass();
if (thisEffectiveClass != oEffectiveClass) return false;
Expand Down

0 comments on commit 843a11b

Please sign in to comment.