SQL-146: EmployeeQueryProvider.GetWcisEmployee¶
This statement is a read operation invoked through ORM (NHibernate LINQ). Executed by EmployeeQueryProvider.GetWcisEmployee.
Classification¶
| Field | Value |
|---|---|
| SQL ID | SQL-146 |
| Operation type | Read |
| Execution method | ORM (NHibernate LINQ) |
| Database | Oracle* |
| Schema | Unknown** |
| Command type | N/A (ORM-generated) |
| Business object | EmployeeQueryProvider |
| Criteria property | N/A — ORM |
| Lifecycle method | GetWcisEmployee |
Parameters¶
| Parameter | Direction | Type | Max length | Description |
|---|---|---|---|---|
id |
Input | string | N/A | Method argument of EmployeeQueryProvider.GetWcisEmployee bound into the ORM expression; NHibernate generates the bind variable at runtime |
Tables¶
| Table | Access | Columns used |
|---|---|---|
WCIS_Employee** |
SELECT | unresolved (see Unresolved mapping) |
LINQ statement¶
Source: Data/SAIF.Data/Queries/Employees/EmployeeQueryProvider.cs:13
// Data/SAIF.Data/Queries/Employees/EmployeeQueryProvider.cs:13
return Factory.GetRepository<WcisEmployee>().Query()
.FirstOrDefault(x => x.Id == id);
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
SELECT *
FROM (
SELECT
<all mapped columns of WcisEmployee> -- unresolved mapping: WcisEmployee column list not documented
FROM WCIS_Employee WE
WHERE WE.<Id column> = :id -- unresolved mapping: WcisEmployee.Id
)
WHERE ROWNUM <= 1
Translation notes:
- Oracle10 row limit for FirstOrDefault(): the query (including any ORDER BY) is wrapped in ROWNUM <= 1 (limit written inline; NHibernate binds it as a parameter at runtime).
- The ** table marker means the mapping lives outside this repository; the table name is confirmed but the columns are not.
- Placeholders in <angle brackets> mark mapping gaps. They are not SQL; they are the skill's unresolved-mapping markers.
Operations and processes¶
Note: Statements marked with
**could not be confirmed; treat as unknown until verified.
Sources¶
Data/SAIF.Data/Queries/Employees/EmployeeQueryProvider.cs:13