diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/EntityDatatableChecksRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/EntityDatatableChecksRepository.java index fa92b24bdc9..eec7e0eff9d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/EntityDatatableChecksRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/EntityDatatableChecksRepository.java @@ -37,7 +37,8 @@ public interface EntityDatatableChecksRepository AND dt.status = :status AND rdt.subtype = :subtype """) - List findByEntityAndStatusAndSubtype(String entity, Integer status, String subtype); + List findByEntityAndStatusAndSubtype(@Param("entity") String entity, @Param("status") Integer status, + @Param("subtype") String subtype); @Query("select t from EntityDatatableChecks t WHERE t.status =:status and t.entity=:entity and t.productId = :productId ") List findByEntityStatusAndProduct(@Param("entity") String entity, @Param("status") Long status, diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadWriteNonCoreDataServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadWriteNonCoreDataServiceImpl.java index 2ff1f24f022..70c3a2ee056 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadWriteNonCoreDataServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadWriteNonCoreDataServiceImpl.java @@ -1657,7 +1657,7 @@ private String getClientOfficeJoinCondition(String officeHierarchy, String appTa } private String getGroupOfficeJoinCondition(String officeHierarchy, String appTableAlias) { - return " join m_group g on g.id = " + appTableAlias + ".client_id " + getOfficeJoinCondition(officeHierarchy, "g"); + return " join m_group g on g.id = " + appTableAlias + ".group_id " + getOfficeJoinCondition(officeHierarchy, "g"); } private String getOfficeJoinCondition(String officeHierarchy, String joinTableAlias) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientRepository.java index e6db6660660..f3a9ff11218 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientRepository.java @@ -40,7 +40,8 @@ public interface ClientRepository extends JpaRepository, JpaSpecif WHERE client.id = :clientId AND (office.hierarchy LIKE :officeHierarchy OR transferToOffice.hierarchy LIKE :transferToOfficeHierarchy) """) - Client fetchByClientIdAndHierarchy(Long clientId, String officeHierarchy, String transferToOfficeHierarchy); + Client fetchByClientIdAndHierarchy(@Param("clientId") Long clientId, @Param("officeHierarchy") String officeHierarchy, + @Param("transferToOfficeHierarchy") String transferToOfficeHierarchy); @Query("SELECT c.id FROM Client c WHERE c.externalId = :externalId") Long findIdByExternalId(@Param("externalId") ExternalId externalId);