SQL-384: Delete Location via DeleteDebtor¶
This statement deletes the Location entity identified by its LOC_SEQ_NUM key from LOCATION, executed via IUnitOfWork.GetRepository<T>().Delete(...) from Services/SAIF.Services/Collections/CollectionsService.cs (L620) in CollectionsService.DeleteDebtor. The SQL below is inferred from this repository call and the NHibernate LocationMap mapping — it is not literal SQL present in source.
Classification¶
| Field | Value |
|---|---|
| SQL ID | SQL-384 |
| Operation type | Delete |
| Execution method | ORM (IRepository.Delete) |
| Database | Oracle |
| Schema | [unqualified]** |
| Command type | N/A (ORM-generated) |
| Business object | Location |
| Criteria property | N/A — ORM |
| Lifecycle method | DeleteDebtor |
Parameters¶
| Parameter | Direction | Type | Max length | Description |
|---|---|---|---|---|
:Id |
Input | long | N/A | Identifier of the Location being deleted (LOC_SEQ_NUM) |
Tables¶
| Table | Access | Columns used |
|---|---|---|
| LOCATION | DELETE | LOC_SEQ_NUM |
LINQ statement¶
Source: Services/SAIF.Services/Collections/CollectionsService.cs:620
// Services/SAIF.Services/Collections/CollectionsService.cs:620
UnitOfWork.GetRepository<LocationDataModel.Location>().Delete(locData);
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 LOCATION
WHERE LOC_SEQ_NUM = :Id
Translation notes:
- Executed only when
debtorData.LocID > 0(line 617); entity loaded byGetDebtorLocation(...)(line 619). LocationDataModel.Location=SAIF.Data.Model.Locations.Location, mapped byLocations/LocationMap.cs.
Operations and processes¶
- CollectionsService.DeleteDebtor — see Operations and processes
Sources¶
Services/SAIF.Services/Collections/CollectionsService.cs (L620)