kapil-panchal commented on code in PR #4902:
URL: https://github.com/apache/fineract/pull/4902#discussion_r2273676530


##########
fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/ApplicationCurrencyRepositoryWrapper.java:
##########
@@ -66,4 +63,17 @@ public ApplicationCurrency 
findOneWithNotFoundDetection(final String currencyCod
         }
         return applicationCurrency;
     }
+
+    public Boolean existsByCode(String code) {
+        return repository.existsByCode(code);
+    }
+
+    public ApplicationCurrency save(ApplicationCurrency currency) {
+        if (existsByCode(currency.getCode())) {

Review Comment:
   Yes, but I want to avoid the sql raising an exception, the application 
should instead raise an exception. I will however move this code to service.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to