Skip to content

SQL-007: Create CbpAuthorizationSurgery via AddSurgeryDate

This ORM statement performs a create operation on CbpAuthorizationSurgery via AddSurgeryDate, executed from Services/SAIF.Services/Claims/Bills/AuthorizationService.cs (L114).

Classification

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

Parameters

Parameter Direction Type Max length Description
:ClaimId Input long N/A Composite-key part
:SurgeryDate Input DateTime N/A Composite-key part
:UpdateNumber Input int N/A Version column (Version()); NHibernate writes its initial value
:UpdateDate Input DateTime N/A
:UpdateUser Input string N/A

Tables

Table Access Columns used
CBP_AUTHORIZATION_SURGERY INSERT CLAIM_ID, SURGERY_DATE, UPDATE_NUM, UPDATE_DATE, UPDATE_USER

LINQ statement

Source: Services/SAIF.Services/Claims/Bills/AuthorizationService.cs:114.

// Services/SAIF.Services/Claims/Bills/AuthorizationService.cs:114
unitOfWork.GetRepository<CbpAuthorizationSurgery>().Add(date);

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
INSERT INTO CBP_AUTHORIZATION_SURGERY (
  CLAIM_ID,
  SURGERY_DATE,
  UPDATE_NUM,
  UPDATE_DATE,
  UPDATE_USER)
VALUES (
  :ClaimId,
  :SurgeryDate,
  :UpdateNumber,
  :UpdateDate,
  :UpdateUser)

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 unless the version unsaved-value identifies the instance as transient. - UPDATE_NUM is the optimistic-concurrency version column (Version(x => x.UpdateNumber)); NHibernate sets its initial value on INSERT.

Operations and processes

Business rules

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

Sources

  • Services/SAIF.Services/Claims/Bills/AuthorizationService.cs (L114)