adamsaghy commented on code in PR #6209:
URL: https://github.com/apache/fineract/pull/6209#discussion_r3925328568


##########
fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/service/FineractEntityAccessReadServiceImpl.java:
##########
@@ -320,4 +373,49 @@ public FineractEntityToEntityMappingData mapRow(final 
ResultSet rs, @SuppressWar
         }
     }
 
+    @Override
+    public String 
getSQLQueryInClauseIDList_ForLoanProductsVisibleToOffice(final Long officeId) {
+        FineractEntityRelation fineractEntityRelation = 
fineractEntityRelationRepository
+                
.findOneByCodeName(FineractEntityAccessType.OFFICE_ACCESS_TO_LOAN_PRODUCTS.getStr());
+        final Long relId = fineractEntityRelation.getId();
+        return "WITH RECURSIVE descendants AS ( " + "  SELECT id, parent_id 
FROM m_office WHERE id = " + officeId + " " + "  UNION ALL "

Review Comment:
   Can we use repository and projections here?



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