From 4ad16b1986ca0974740972dd295e95d87aede865 Mon Sep 17 00:00:00 2001 From: Max Rydahl Andersen Date: Fri, 8 Jul 2005 07:37:51 +0000 Subject: [PATCH] initial doc of collection keys git-svn-id: https://svn.jboss.org/repos/hibernate/trunk/Hibernate3/doc@7419 1b8cb986-b30d-0410-93ca-fae66ebed9b2 --- reference/en/modules/query_sql.xml | 75 ++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/reference/en/modules/query_sql.xml b/reference/en/modules/query_sql.xml index 87a3bd99ff..91a6fbeb8f 100644 --- a/reference/en/modules/query_sql.xml +++ b/reference/en/modules/query_sql.xml @@ -67,6 +67,7 @@ the entity returned by the query, and its SQL table alias + @@ -132,8 +133,82 @@ List loggedCats = sess.createSQLQuery(sql) properties of the class and its subclasses! + + The following table shows the different possibilities of using the alias injection. Note: the alias names in the result + are examples, each alias will have a unique and probably different name when used. + + + + Alias injection names + + + + + + + Description + Syntax + Result + + + + + A simple property + A_NAME as {item.name} + ANAME as name0_0_ + + + A multi-column property + CURRENCY as {item.amount.currency}, VALUE as {item.amount.value} + CURRENCY as curr0_0_, VALUE as curr1_0_ + + + All properties of an entity + {item.*} + ANAME as name0_0_, CURRENCY as curr0_0_, VALUE as curr1_0_ + + + A collection key + {coll.key} + + + + The id of an collection + {coll.id} + + + + + The element of an collection + {coll.element} + + + + Property of the element in the collection + {coll.element.name} + + + + + + All properties of the element in the collection + {coll.element.*} + + + + + All properties of the the collection + {coll.*} + + + + + +
+ + Named SQL queries