fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [fineract] vorburger commented on a change in pull request #925: FINERACT-997
Date Fri, 22 May 2020 19:21:39 GMT

vorburger commented on a change in pull request #925:
URL: https://github.com/apache/fineract/pull/925#discussion_r429418163



##########
File path: fineract-provider/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/domain/ProductToGLAccountMappingRepository.java
##########
@@ -30,8 +30,9 @@
     ProductToGLAccountMapping findByProductIdAndProductTypeAndFinancialAccountTypeAndPaymentTypeId(Long
productId, int productType,
             int financialAccountType, Long paymentType);
 
-    ProductToGLAccountMapping findByProductIdAndProductTypeAndFinancialAccountTypeAndChargeId(Long
productId, int productType,
-            int financialAccountType, Long chargeId);
+    @Query("select mapping from ProductToGLAccountMapping mapping where mapping.productId=
:productId and mapping.productType= :productType and mapping.financialAccountType= :financialAccountType
and mapping.charge.id= :chargeId")
+    ProductToGLAccountMapping findProductIdAndProductTypeAndFinancialAccountTypeAndChargeId(@Param("productId")
Long productId, @Param("productType") int productType,
+            @Param("financialAccountType") int financialAccountType, @Param("chargeId") Long
ChargeId);

Review comment:
       @maektwain thanks for your explanations, I now (kind of) see what you mean - I had
previously missed the `Charge` vs. `Long chargeId` ... then I guess this fix makes sense.
I'm still puzzled as to why Spring doesn't flag this, but let's pick that up separately in
FINERACT-998 later. I'm going to LGTM this PR, but not merge it, to let others review it as
well, and give you a chance to still add an IT for it, that would be nice, but I don't want
to blocking merging this even if no IT.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message