|
18 | 18 | <literal>ISession.CreateSQLQuery()</literal>. The following describes how
|
19 | 19 | to use this API for querying.</para>
|
20 | 20 |
|
21 |
| - <sect2> |
| 21 | + <sect2 id="querysql-scalar"> |
22 | 22 | <title>Scalar queries</title>
|
23 | 23 |
|
24 | 24 | <para>The most basic SQL query is to get a list of scalars
|
|
50 | 50 | columns.</para>
|
51 | 51 | </sect2>
|
52 | 52 |
|
53 |
| - <sect2> |
| 53 | + <sect2 id="querysql-entity"> |
54 | 54 | <title>Entity queries</title>
|
55 | 55 |
|
56 | 56 | <para>The above query was about returning scalar values,
|
@@ -92,7 +92,7 @@ sess.CreateSQLQuery("SELECT ID, NAME, BIRTHDATE FROM CATS").AddEntity(typeof(Cat
|
92 | 92 | <para>This will allow cat.Dog property access to function properly.</para>
|
93 | 93 | </sect2>
|
94 | 94 |
|
95 |
| - <sect2> |
| 95 | + <sect2 id="querysql-associations-collections"> |
96 | 96 | <title>Handling associations and collections</title>
|
97 | 97 |
|
98 | 98 | <para>It is possible to eagerly join in the <literal>Dog</literal> to
|
@@ -129,7 +129,7 @@ sess.CreateSQLQuery("SELECT ID, NAME, BIRTHDATE FROM CATS").AddEntity(typeof(Cat
|
129 | 129 | names are not enough.</para>
|
130 | 130 | </sect2>
|
131 | 131 |
|
132 |
| - <sect2> |
| 132 | + <sect2 id="querysql-multiple-entities"> |
133 | 133 | <title>Returning multiple entities</title>
|
134 | 134 |
|
135 | 135 | <para>Until now the result set column names are assumed to be the same
|
@@ -315,7 +315,7 @@ var loggedCats = sess.CreateSQLQuery(sql)
|
315 | 315 | </sect3>
|
316 | 316 | </sect2>
|
317 | 317 |
|
318 |
| - <sect2> |
| 318 | + <sect2 id="querysql-non-managed-entities"> |
319 | 319 | <title>Returning non-managed entities</title>
|
320 | 320 |
|
321 | 321 | <para>It is possible to apply an <literal>IResultTransformer</literal> to native sql queries. Allowing it to e.g. return non-managed entities.</para>
|
@@ -345,15 +345,15 @@ var loggedCats = sess.CreateSQLQuery(sql)
|
345 | 345 | </para>
|
346 | 346 | </sect2>
|
347 | 347 |
|
348 |
| - <sect2> |
| 348 | + <sect2 id="querysql-inheritance"> |
349 | 349 | <title>Handling inheritance</title>
|
350 | 350 |
|
351 | 351 | <para>Native SQL queries which query for entities that are mapped as part
|
352 | 352 | of an inheritance hierarchy must include all properties for the base class and all
|
353 | 353 | its subclasses.</para>
|
354 | 354 | </sect2>
|
355 | 355 |
|
356 |
| - <sect2> |
| 356 | + <sect2 id="querysql-parameters"> |
357 | 357 | <title>Parameters</title>
|
358 | 358 |
|
359 | 359 | <para>Native SQL queries support positional as well as named
|
|
0 commit comments