Fix BadSqlGrammarException on GET /clients?status=pending — missing SELECT column

The second schema() builder used by the clients-list query had the JOIN
  left join m_client gc on gc.id = c.guardian_client_id
and the SELECT
  c.guardian_client_id as guardianClientId
but was missing
  gc.display_name as guardianClientDisplayName
which the RowMapper still reads (rs.getString("guardianClientDisplayName")).

Result: PSQLException "The column name guardianClientDisplayName was not found
in this ResultSet" → BadSqlGrammarException → 500 on any client-list pull.

The matching first builder (~line 327) had both columns correctly. Added the
missing SELECT line to keep the pair consistent.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Aditya
2026-05-21 15:35:59 +05:30
co-authored by Claude Opus 4.7
parent be26ba16c9
commit c6f130e116
@@ -718,6 +718,7 @@ public class ClientReadPlatformServiceImpl implements ClientReadPlatformService
builder.append("c.nationality as nationality, ");
builder.append("c.is_minor as isMinor, ");
builder.append("c.guardian_client_id as guardianClientId, ");
builder.append("gc.display_name as guardianClientDisplayName, ");
builder.append("c.guardian_relation as guardianRelation, ");
builder.append("c.alternate_mobile_no as alternateMobileNo, ");
builder.append("c.dip_verified as dipVerified, ");