---
title: "SQL-056: Create TempDataPersonAddress via InsertTempRecords"
summary: Create operation against TempDataPersonAddress via NHibernate ORM.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-09-24
library: SAIF.Services
reference_type: package
---

# SQL-056: Create TempDataPersonAddress via InsertTempRecords

This ORM statement performs a create operation on `TempDataPersonAddress` via `InsertTempRecords`, executed from `Services/SAIF.Services/Collections/SoilService.cs` (L299).

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-056 |
| **Operation type** | Create |
| **Execution method** | ORM (IRepository.Add) |
| **Database** | Oracle |
| **Schema** | [unqualified]** |
| **Command type** | N/A (ORM-generated) |
| **Business object** | `TempDataPersonAddress` |
| **Criteria property** | N/A — ORM |
| **Lifecycle method** | `InsertTempRecords` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:RunId` | Input | `string` | N/A | Composite-key part |
| `:PersonId` | Input | `Int64` | N/A | Composite-key part |
| `:AddressCode` | Input | `string` | N/A | Composite-key part |
| `:DeathDate` | Input | `DateTime?` | N/A |  |
| `:PrimaryFirstName` | Input | `string` | N/A |  |
| `:PrimaryLastName` | Input | `string` | N/A |  |
| `:PrimaryMiddleName` | Input | `string` | N/A |  |
| `:PrimaryNameExtensionCode` | Input | `string` | N/A |  |
| `:AddressLine1` | Input | `string` | N/A |  |
| `:AddressLine2` | Input | `string` | N/A |  |
| `:AddressLine3` | Input | `string` | N/A |  |
| `:AddressLine4` | Input | `string` | N/A |  |
| `:CityName` | Input | `string` | N/A |  |
| `:StateCode` | Input | `string` | N/A |  |
| `:ZipCode` | Input | `string` | N/A |  |
| `:DirectDepositBankAcctId` | Input | `string` | N/A |  |
| `:ZipCodeExt` | Input | `string` | N/A |  |
| `:GenderCode` | Input | `string` | N/A |  |
| `:UpdateUser` | Input | `string` | N/A |  |
| `:UpdateDate` | Input | `DateTime?` | N/A |  |
| `:PaymentFlagCode` | Input | `string` | N/A |  |
| `:EffDate` | Input | `DateTime?` | N/A |  |
| `:ExpDate` | Input | `DateTime?` | N/A |  |
| `:BirthDate` | Input | `DateTime?` | N/A |  |
| `:PrimaryTaxID` | Input | `string` | N/A |  |
| `:ClaimNumber` | Input | `string` | N/A |  |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [CLM_DBA.TEMP_DATA_PERSON_ADDRESS](../database-tables.md#temp_data_person_address) | INSERT | RUN_ID, PERSON_ID, ADDRESS_CODE, DEATH_DATE, primary_first_name, primary_last_name, primary_middle_name, primary_name_extension_code, address_line1, address_line2, address_line3, address_line4, city_name, STATE_CODE, ZIP_CODE, direct_deposit_bank_acct_id, zip_code_ext, GENDER_CODE, update_user, UPDATE_DATE, payment_flag_code, EFF_DATE, EXP_DATE, Birth_Date, Primary_Tax_ID, CLM_NUM |

## LINQ statement

Source: `Services/SAIF.Services/Collections/SoilService.cs:299`.

```csharp
// Services/SAIF.Services/Collections/SoilService.cs:299
UnitOfWork.GetRepository<TempDataPersonAddress>().Add(record);
```

## 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
INSERT INTO CLM_DBA.TEMP_DATA_PERSON_ADDRESS (
  RUN_ID,
  PERSON_ID,
  ADDRESS_CODE,
  DEATH_DATE,
  primary_first_name,
  primary_last_name,
  primary_middle_name,
  primary_name_extension_code,
  address_line1,
  address_line2,
  address_line3,
  address_line4,
  city_name,
  STATE_CODE,
  ZIP_CODE,
  direct_deposit_bank_acct_id,
  zip_code_ext,
  GENDER_CODE,
  update_user,
  UPDATE_DATE,
  payment_flag_code,
  EFF_DATE,
  EXP_DATE,
  Birth_Date,
  Primary_Tax_ID,
  CLM_NUM)
VALUES (
  :RunId,
  :PersonId,
  :AddressCode,
  :DeathDate,
  :PrimaryFirstName,
  :PrimaryLastName,
  :PrimaryMiddleName,
  :PrimaryNameExtensionCode,
  :AddressLine1,
  :AddressLine2,
  :AddressLine3,
  :AddressLine4,
  :CityName,
  :StateCode,
  :ZipCode,
  :DirectDepositBankAcctId,
  :ZipCodeExt,
  :GenderCode,
  :UpdateUser,
  :UpdateDate,
  :PaymentFlagCode,
  :EffDate,
  :ExpDate,
  :BirthDate,
  :PrimaryTaxID,
  :ClaimNumber)
```

Translation notes:
- Composite identifier (`CompositeId()`) with no generator: every key part is supplied by the caller. A stateful `SaveOrUpdate` on a composite-key entity may first issue a `SELECT` by the key columns to decide between INSERT and UPDATE.

## Operations and processes
- SoilService.InsertTempRecords — see [Operations and processes](../operations-processes.md)

> **Note:** Statements marked with `**` could not be confirmed; treat as unknown until verified.

## Sources
- `Services/SAIF.Services/Collections/SoilService.cs (L299)`
