Skip to content

SQL-371: Delete DocumentImagingError via ExportErrorEnrollmentDocuments

This statement deletes the DocumentImagingError entity identified by its identifier (ID) via IUnitOfWork.GetRepository<T>().Delete(entity), invoked from McoImageExporter.ExportErrorEnrollmentDocuments (Services/SAIF.Services/Imaging/McoImageExporter.cs:190). The repository is obtained earlier as a local field. The SQL below is inferred from this repository call and the DocumentImagingError NHibernate mapping — it is not literal SQL present in source.

Classification

Field Value
SQL ID SQL-371
Operation type Delete
Execution method ORM (IRepository.Delete)
Database Oracle
Schema CLM_DBA
Command type N/A (ORM-generated)
Business object DocumentImagingError
Criteria property N/A — ORM
Lifecycle method ExportErrorEnrollmentDocuments

Parameters

Parameter Direction Type Max length Description
:Id Input int? N/A Identifier of the DocumentImagingError being deleted (ID)

Tables

Table Access Columns used
DOCUMENT_IMAGING_ERROR DELETE ID

LINQ statement

Source: Services/SAIF.Services/Imaging/McoImageExporter.cs:190. The repository is obtained on line 152.

// Services/SAIF.Services/Imaging/McoImageExporter.cs:152
var repository = _unitOfWork.GetRepository<DocumentImagingError>();

// Services/SAIF.Services/Imaging/McoImageExporter.cs:190
repository.Delete(error);

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
DELETE FROM CLM_DBA.document_imaging_error
WHERE ID = :Id

Translation notes:

  • Schema("CLM_DBA") + Table("document_imaging_error") (lines 12-13); table name casing reproduced as mapped.
  • repository is _unitOfWork.GetRepository<DocumentImagingError>() (line 152). The entity is modified after Delete (line 192) but only for in-memory reporting.

Operations and processes

Sources

  • Services/SAIF.Services/Imaging/McoImageExporter.cs (L190)