From 53ce2f9f3818b5274db58cb7e89d83698118e0f7 Mon Sep 17 00:00:00 2001 From: Lubos Racansky Date: Thu, 25 Aug 2022 14:22:29 +0200 Subject: [PATCH] Fix #325: OperationTemplateEntity equals uses generated id --- .../database/entity/OperationTemplateEntity.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/enrollment-server/src/main/java/com/wultra/app/enrollmentserver/database/entity/OperationTemplateEntity.java b/enrollment-server/src/main/java/com/wultra/app/enrollmentserver/database/entity/OperationTemplateEntity.java index b525271be..9c9becf8f 100644 --- a/enrollment-server/src/main/java/com/wultra/app/enrollmentserver/database/entity/OperationTemplateEntity.java +++ b/enrollment-server/src/main/java/com/wultra/app/enrollmentserver/database/entity/OperationTemplateEntity.java @@ -65,8 +65,7 @@ public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof OperationTemplateEntity)) return false; OperationTemplateEntity that = (OperationTemplateEntity) o; - return id.equals(that.id) - && Objects.equals(placeholder, that.placeholder) + return Objects.equals(placeholder, that.placeholder) && Objects.equals(language, that.language) && Objects.equals(title, that.title) && Objects.equals(message, that.message) @@ -75,6 +74,6 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(id, placeholder, language, title, message, attributes); + return Objects.hash(placeholder, language, title, message, attributes); } }