Skip to content

SQL-141: Retrieve ClaimNoteCategory via CreateTaskNote

This ORM statement performs a read operation on ClaimNoteCategory via IUnitOfWork.GetRepository<T>(), executed from Services/SAIF.Services/Claims/Tasks/TaskService.cs (L819).

Classification

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

Parameters

Parameter Direction Type Max length Description
_notePreferences["CategoryCode"] Input ** N/A x.Code == _notePreferences["CategoryCode"] → column CODE
_notePreferences["TypeCode"] Input ** N/A x.Code == _notePreferences["TypeCode"] → column CODE

Tables

Table Access Columns used
CLAIM_ACTIVITY_CATEGORY_CODE SELECT CODE, CODE_DESCR, EXTERNAL_VIEW_DEFAULT_FLAG

LINQ statement

Source: Services/SAIF.Services/Claims/Tasks/TaskService.cs:819

// Services/SAIF.Services/Claims/Tasks/TaskService.cs:819-821
                ClaimNoteCategory = _unitOfWork.GetRepository<ClaimNoteCategory>()
                    .Query()
                    .SingleOrDefault(x => x.Code == _notePreferences["CategoryCode"]),

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.

-- Inferred from LINQ (NHibernate mapping translation); not concrete SQL
-- Services/SAIF.Services/Claims/Tasks/TaskService.cs:819
SELECT
  CACC.CODE,
  CACC.CODE_DESCR,
  CACC.EXTERNAL_VIEW_DEFAULT_FLAG
FROM CLAIM_ACTIVITY_CATEGORY_CODE CACC
WHERE CACC.CODE = :CategoryCode
-- NHibernate expects at most one row

Translation notes: - _notePreferences["CategoryCode"] is a dictionary lookup on a field, evaluated client-side -> bind :CategoryCode.

Operations and processes

Sources

  • Services/SAIF.Services/Claims/Tasks/TaskService.cs (L819)