---
title: "SQL-269: Retrieve PolicyPeriodCoverageBind via GetPolicyPeriodCoverageBind"
summary: Read operation against PolicyPeriodCoverageBind via NHibernate ORM.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-09-24
library: SAIF.Services
reference_type: package
---

# SQL-269: Retrieve PolicyPeriodCoverageBind via GetPolicyPeriodCoverageBind

This statement loads the single `PolicyPeriodCoverageBind` row matching a policy number and policy period effective date, used to determine the coverage bind cancel date for a certificate. It runs via `IUnitOfWork.GetRepository<T>()`, executed from `Services/SAIF.Services/Policies/Certificates/Information/CertificateInformationService.cs (L512)`.

## Classification

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

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:policyNumber` | Input | long | N/A | policy number to match |
| `:policyPeriodEffectiveDate` | Input | DateTime | N/A | policy period effective date to match |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [POLICY_PERIOD_COVERAGE_BIND](../database-tables.md#policy_period_coverage_bind) | SELECT | `POLICY_NUM`, `POLICY_PERIOD_EFF_DATE`, `BIND_CANCEL_DATE` |

## LINQ statement

Source: `Services/SAIF.Services/Policies/Certificates/Information/CertificateInformationService.cs:512`

```csharp
// Services/SAIF.Services/Policies/Certificates/Information/CertificateInformationService.cs:512-515
return unitOfWork.GetRepository<PolicyPeriodCoverageBind>()
        .Query()
        .SingleOrDefault(a => a.PolicyNumber == policyNumber &&
                              a.PolicyPeriodEffectiveDate == policyPeriodEffectiveDate);
```

## 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
  PPCB.POLICY_NUM,
  PPCB.POLICY_PERIOD_EFF_DATE,
  PPCB.BIND_CANCEL_DATE
FROM POLICY_PERIOD_COVERAGE_BIND PPCB
WHERE PPCB.POLICY_NUM = :policyNumber
  AND PPCB.POLICY_PERIOD_EFF_DATE = :policyPeriodEffectiveDate
-- NHibernate expects at most one row
```

Translation notes:
- `CompositeId` key properties (`PolicyPeriodCoverageBindMap.cs:14-16`) are plain columns.
- `Single`/`SingleOrDefault` → no row limit; NHibernate throws if more than one row is returned.

## Operations and processes
- CertificateInformationService.GetPolicyPeriodCoverageBind — see [Operations and processes](../operations-processes.md)

## Sources
- `Services/SAIF.Services/Policies/Certificates/Information/CertificateInformationService.cs (L512)`
