---
title: "SQL-189: Retrieve EmployerLiabilityFactors via GetStandardLimits"
summary: Read operation against EmployerLiabilityFactors via NHibernate ORM.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-09-25
library: SAIF.Services
reference_type: package
---

# SQL-189: Retrieve EmployerLiabilityFactors via GetStandardLimits

This statement retrieves the `EmployerLiabilityFactors` rows flagged as standard limits, called from `CertificateInformationService.GetStandardLimits`.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-189 |
| **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** | `GetStandardLimits` |

## Parameters

None — the query filters on the literal `'Y'` flag; no bind parameters.

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [EMPLOYERS_LIABILITY_FACTORS](../database-tables.md#employers_liability_factors) | SELECT | `emp_liab_stat_code`, `emp_liab_eff_date` (composite key), `emp_liab_exp_date`, `standard_limits_flag`; filter `standard_limits_flag` |

## LINQ statement

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

```csharp
var limitHistoryCodeList =
    unitOfWork.GetRepository<EmployerLiabilityFactors>()
        .Query().Where(elf => (elf.IsStandardLimit)).ToList();
```

## 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 ELF.emp_liab_stat_code,
       ELF.emp_liab_eff_date,
       ELF.emp_liab_exp_date,
       ELF.standard_limits_flag
FROM   employers_liability_factors ELF
WHERE  ELF.standard_limits_flag = 'Y'
```

Translation notes:
- `IsStandardLimit` is mapped as `YesNoType` → `'Y'`.
- The `SingleOrDefault(... IsBetween ...)` at L477-480 runs in memory over the materialized list (`DateTime.Now`, `DateTime.MaxValue`, and `IsBetween` are LINQ-to-Objects).
- The composite-id properties are also `Map`ped; they are selected once.

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

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