josehernandezfintecheandomx commented on code in PR #3311:
URL: https://github.com/apache/fineract/pull/3311#discussion_r1269554348


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/search/service/SearchReadPlatformServiceImpl.java:
##########
@@ -90,7 +90,7 @@ public String searchSchema(final SearchConditions 
searchConditions) {
                 + " order by l.id desc";
 
         final String savingMatchSql = " (select 'SAVING' as entityType, s.id 
as entityId, sp.name as entityName, s.external_id as entityExternalId, 
s.account_no as entityAccountNo "
-                + " , coalesce(c.id,g.id) as parentId, 
coalesce(c.display_name,g.display_name) as parentName, null as entityMobileNo, 
s.status_enum as entityStatusEnum, s.deposit_type_enum as subEntityType, CASE 
WHEN g.id is null THEN 'client' ELSE 'group' END as parentType "
+                + " , coalesce(c.id,g.id) as parentId, 
coalesce(c.display_name, g.display_name) as parentName, null as entityMobileNo, 
s.status_enum as entityStatusEnum, concat(s.deposit_type_enum, '') as 
subEntityType, CASE WHEN g.id is null THEN 'client' ELSE 'group' END as 
parentType "

Review Comment:
   There will be not a problem, because in the SQL both values are now Strings 
values in the Loan will be null and in the Savings will be the Deposit Type (if 
exists) as `String` too. We get this because we are using the `concat` 
function. Even in the POJO `SearchData` this attribute is `String` type
   `    private final String subEntityType;
   `



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