From 9e464546d8495b91f1dd70e5b68883c27b1d4d2f Mon Sep 17 00:00:00 2001 From: narwa Date: Mon, 9 Dec 2024 16:04:55 +0700 Subject: [PATCH] refactor(PurchaseSpec): compare with object type rather than string Took 15 minutes --- src/main/java/dev/kons/kuenyawz/repositories/PurchaseSpec.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/dev/kons/kuenyawz/repositories/PurchaseSpec.java b/src/main/java/dev/kons/kuenyawz/repositories/PurchaseSpec.java index 953058cc..b7d79b64 100644 --- a/src/main/java/dev/kons/kuenyawz/repositories/PurchaseSpec.java +++ b/src/main/java/dev/kons/kuenyawz/repositories/PurchaseSpec.java @@ -80,7 +80,7 @@ public static Specification withPaymentType(PaymentType paymentType) { if (paymentType == null) return null; - return cb.equal(root.get("paymentType"), paymentType.getType()); + return cb.equal(root.get("paymentType"), paymentType); }; }