Skip to content

Commit

Permalink
Fix mother search
Browse files Browse the repository at this point in the history
  • Loading branch information
hamza-vd committed May 9, 2023
1 parent 7ee84b5 commit 06a3dc8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ public String getObjectIdsQuery(String mainCondition, String filters) {
strFilters = String.format(" WHERE (" + getDemographicTable() + ".first_name LIKE '%%%s%%' OR "+getDemographicTable()+ ".last_name LIKE '%%%s%%')", filters, filters);
}

return "SELECT " + getChildDetailsTable() + ".id " +
"FROM " + getChildDetailsTable() + " " + getChildDetailsTable() + " " +
"LEFT JOIN " + getDemographicTable() + " ON " + getChildDetailsTable() + ".id = " + getDemographicTable() + ".base_entity_id " +
return "SELECT " + getDemographicTable() + ".id " +
"FROM " + getDemographicTable() + " " + getDemographicTable() + " " +
"LEFT JOIN " + getChildDetailsTable() + " ON " + getDemographicTable() + ".id = " + getChildDetailsTable() + ".base_entity_id " +
strMainCondition + strFilters;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ public class RegisterQueryProviderTest extends BaseUnitTest {

private RegisterQueryProvider queryProvider;

private String expectedQuery = "SELECT ec_child_details.id FROM ec_child_details ec_child_details " +
"LEFT JOIN ec_client ON ec_child_details.id = ec_client.base_entity_id ";
private String expectedQuery = "SELECT ec_client.id FROM ec_client ec_client LEFT JOIN ec_child_details " +
"ON ec_client.id = ec_child_details.base_entity_id ";

private String registerQuery = "SELECT %s FROM ec_child_details " +
"JOIN ec_mother_details ON ec_child_details.relational_id = ec_mother_details.base_entity_id " +
Expand Down

0 comments on commit 06a3dc8

Please sign in to comment.