---
title: "SQL-059: ClaimQueryProvider.GetClaimPersonAddresses"
summary: Read operation for `ClaimQueryProvider.GetClaimPersonAddresses`
status: draft
owner: SAIF.Core documentation team
last_reviewed: 2026-09-24
library: SAIF.Data
reference_type: package
---

# SQL-059: ClaimQueryProvider.GetClaimPersonAddresses

This statement is a read operation invoked through ORM (NHibernate LINQ). Executed by `ClaimQueryProvider.GetClaimPersonAddresses`.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-059 |
| **Operation type** | Read |
| **Execution method** | ORM (NHibernate LINQ) |
| **Database** | Oracle* |
| **Schema** | [unqualified]** |
| **Command type** | N/A (ORM-generated) |
| **Business object** | `ClaimQueryProvider` |
| **Criteria property** | N/A — ORM |
| **Lifecycle method** | `GetClaimPersonAddresses` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `personId` | Input | long | N/A | Method argument of `ClaimQueryProvider.GetClaimPersonAddresses` bound into the ORM expression; NHibernate generates the bind variable at runtime |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [CL_CLAIM_PERSON_ADDRESS](../database-tables.md#cl_claim_person_address) | SELECT | PERSON_ID, ADDRESS_CODE, UPDATE_DATE, CITY_NAME, COUNTY_CODE, EFF_DATE, EXP_DATE, ADDRESS_LINE1, ADDRESS_LINE2, ADDRESS_LINE3, ADDRESS_LINE4, ZIP_CODE_EXT, STATE_CODE, ZIP_CODE, UPDATE_USER, UPDATE_NUM, FOREIGN_ADDRESS_FLAG |

## LINQ statement

Source: `Data/SAIF.Data/Queries/Claims/ClaimQueryProvider.cs:223-224`.

```csharp
var repo = Factory.GetRepository<ClaimPersonAddress>();
return repo.Query().Where(x => x.PersonId == personId).OrderByDescending(x => x.UpdateDate);
```

## Sample SQL

> **Inferred SQL:** This SQL was inferred from the LINQ statement above and the NHibernate mappings. It is not concrete SQL from source code; NHibernate generates the executed statement at runtime, so aliases, column order, join syntax, and bind-parameter names may differ.

```sql
-- Inferred from LINQ (NHibernate mapping translation); not concrete SQL
SELECT
  CCPA.PERSON_ID,
  CCPA.ADDRESS_CODE,
  CCPA.UPDATE_DATE,
  CCPA.CITY_NAME,
  CCPA.COUNTY_CODE,
  CCPA.EFF_DATE,
  CCPA.EXP_DATE,
  CCPA.ADDRESS_LINE1,
  CCPA.ADDRESS_LINE2,
  CCPA.ADDRESS_LINE3,
  CCPA.ADDRESS_LINE4,
  CCPA.ZIP_CODE_EXT,
  CCPA.STATE_CODE,
  CCPA.ZIP_CODE,
  CCPA.UPDATE_USER,
  CCPA.UPDATE_NUM,
  CCPA.FOREIGN_ADDRESS_FLAG
FROM CL_CLAIM_PERSON_ADDRESS CCPA
WHERE CCPA.PERSON_ID = :personId
ORDER BY CCPA.UPDATE_DATE DESC
```

Translation notes:
- The method returns an unmaterialized `IQueryable` typed as `IEnumerable`. The SQL runs when the caller enumerates it, once per enumeration.
- `ADDRESS_CODE` is the FK column of the `AddressType` key-reference; the address-type table is not joined.

## Operations and processes

- [Claim status and compensability](../operations/claim-status-and-compensability.md)


## Sources
- `Data/SAIF.Data/Queries/Claims/ClaimQueryProvider.cs:223`
