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

# SQL-242: Retrieve OutputDocumentNotifyTextCode via FillOutputDocumentProperty

This ORM statement retrieves a single `OutputDocumentNotifyTextCode` reference-code row by its code, via `IRepository.Get`, executed from `Services/SAIF.Services/OutputDocuments/PolicyDocumentsBatchService.cs (L355-357)`.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-242 |
| **Operation type** | Read |
| **Execution method** | ORM (IRepository.Get) |
| **Database** | Oracle |
| **Schema** | [unqualified]** |
| **Command type** | N/A (ORM-generated) |
| **Business object** | `PolicyDocumentsBatchService` |
| **Criteria property** | N/A — ORM |
| **Lifecycle method** | `FillOutputDocumentProperty` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:id` | Input | string | N/A | `releasedAgencyDeliveredSaifDoc.OutputDocument.DocumentType.DirectWriteNotifyText.Code`, evaluated in memory before `Get` is called |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [OUTPUT_DOC_NOTIFY_TEXT_CODE](../database-tables.md#output_doc_notify_text_code) | SELECT | `code`, `code_descr`, `notification_text` |

## LINQ statement

Source: `Services/SAIF.Services/OutputDocuments/PolicyDocumentsBatchService.cs:355`

```csharp
// Services/SAIF.Services/OutputDocuments/PolicyDocumentsBatchService.cs:355-357
releasedAgencyDeliveredSaifDoc.OutputDocument.DocumentType.DirectWriteNotifyText =
    unitOfWork.GetRepository<OutputDocumentNotifyTextCode>()
        .Get(releasedAgencyDeliveredSaifDoc.OutputDocument.DocumentType.DirectWriteNotifyText.Code);
```

## 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
  ODNTC.code,
  ODNTC.code_descr,
  ODNTC.notification_text
FROM output_doc_notify_text_code ODNTC
WHERE ODNTC.code = :id
```

Translation notes:
- `Get(id)` may be satisfied from the session first-level cache without a round trip.

## Operations and processes
- PolicyDocumentsBatchService.FillOutputDocumentProperty — see [Operations and processes](../operations-processes.md)

## Sources
- `Services/SAIF.Services/OutputDocuments/PolicyDocumentsBatchService.cs (L356)`
