[HHH-2976] Documentation of Native SQLQuery contains errors
git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@15041 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
ab7bc991ff
commit
d6ea776b85
|
@ -238,9 +238,9 @@ sess.createSQLQuery("SELECT ID, NAME, BIRTHDATE FROM CATS").addEntity(Cat.class)
|
||||||
declared in the mapping metadata. Notice that we may even use the
|
declared in the mapping metadata. Notice that we may even use the
|
||||||
property aliases in the where clause if we like.</para>
|
property aliases in the where clause if we like.</para>
|
||||||
|
|
||||||
<programlisting><![CDATA[String sql = "SELECT ID as {c.id}, NAME as {c.name}, " +
|
<programlisting><![CDATA[String sql = "SELECT ID as {cat.id}, NAME as {cat.name}, " +
|
||||||
"BIRTHDATE as {c.birthDate}, MOTHER_ID as {c.mother}, {mother.*} " +
|
"BIRTHDATE as {cat.birthDate}, MOTHER_ID as {cat.mother}, {mother.*} " +
|
||||||
"FROM CAT_LOG c, CAT_LOG m WHERE {c.mother} = c.ID";
|
"FROM CAT_LOG cat, CAT_LOG mother WHERE {cat.mother} = cat.ID";
|
||||||
|
|
||||||
List loggedCats = sess.createSQLQuery(sql)
|
List loggedCats = sess.createSQLQuery(sql)
|
||||||
.addEntity("cat", Cat.class)
|
.addEntity("cat", Cat.class)
|
||||||
|
|
|
@ -439,21 +439,21 @@ msgstr ""
|
||||||
|
|
||||||
#: index.docbook:192
|
#: index.docbook:192
|
||||||
msgid ""
|
msgid ""
|
||||||
"<![CDATA[String sql = \"SELECT ID as {c.id}, NAME as {c.name}, \" + \n"
|
"<![CDATA[String sql = \"SELECT ID as {cat.id}, NAME as {cat.name}, \" + \n"
|
||||||
" \"BIRTHDATE as {c.birthDate}, MOTHER_ID as {c.mother}, {mother.*} "
|
" \"BIRTHDATE as {cat.birthDate}, MOTHER_ID as {cat.mother}, {mother.*} "
|
||||||
"\" +\n"
|
"\" +\n"
|
||||||
" \"FROM CAT_LOG c, CAT_LOG m WHERE {c.mother} = c.ID\";\n"
|
" \"FROM CAT_LOG cat, CAT_LOG mother WHERE {cat.mother} = cat.ID\";\n"
|
||||||
"\n"
|
"\n"
|
||||||
"List loggedCats = sess.createSQLQuery(sql)\n"
|
"List loggedCats = sess.createSQLQuery(sql)\n"
|
||||||
" .addEntity(\"cat\", Cat.class)\n"
|
" .addEntity(\"cat\", Cat.class)\n"
|
||||||
" .addEntity(\"mother\", Cat.class).list()\n"
|
" .addEntity(\"mother\", Cat.class).list()\n"
|
||||||
"]]>"
|
"]]>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"<![CDATA[String sql = \"SELECT ID as {c.id}, NAME as {c.name}, \" + \n"
|
"<![CDATA[String sql = \"SELECT ID as {cat.id}, NAME as {cat.name}, \" + \n"
|
||||||
" \"BIRTHDATE as {c."
|
" \"BIRTHDATE as {cat."
|
||||||
"birthDate}, MOTHER_ID as {c.mother}, {mother.*} \" +\n"
|
"birthDate}, MOTHER_ID as {cat.mother}, {mother.*} \" +\n"
|
||||||
" \"FROM CAT_LOG c, "
|
" \"FROM CAT_LOG cat, "
|
||||||
"CAT_LOG m WHERE {c.mother} = c.ID\";\n"
|
"CAT_LOG mother WHERE {cat.mother} = cat.ID\";\n"
|
||||||
" \n"
|
" \n"
|
||||||
" List loggedCats = sess."
|
" List loggedCats = sess."
|
||||||
"createSQLQuery(sql)\n"
|
"createSQLQuery(sql)\n"
|
||||||
|
|
|
@ -476,10 +476,10 @@ msgstr ""
|
||||||
#: query_sql.xml:192
|
#: query_sql.xml:192
|
||||||
#, no-c-format
|
#, no-c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"<![CDATA[String sql = \"SELECT ID as {c.id}, NAME as {c.name}, \" + \n"
|
"<![CDATA[String sql = \"SELECT ID as {cat.id}, NAME as {cat.name}, \" + \n"
|
||||||
" \"BIRTHDATE as {c.birthDate}, MOTHER_ID as {c.mother}, {mother.*} "
|
" \"BIRTHDATE as {cat.birthDate}, MOTHER_ID as {cat.mother}, {mother.*} "
|
||||||
"\" +\n"
|
"\" +\n"
|
||||||
" \"FROM CAT_LOG c, CAT_LOG m WHERE {c.mother} = c.ID\";\n"
|
" \"FROM CAT_LOG cat, CAT_LOG mother WHERE {cat.mother} = cat.ID\";\n"
|
||||||
"\n"
|
"\n"
|
||||||
"List loggedCats = sess.createSQLQuery(sql)\n"
|
"List loggedCats = sess.createSQLQuery(sql)\n"
|
||||||
" .addEntity(\"cat\", Cat.class)\n"
|
" .addEntity(\"cat\", Cat.class)\n"
|
||||||
|
|
|
@ -465,10 +465,10 @@ msgstr ""
|
||||||
#: query_sql.xml:192
|
#: query_sql.xml:192
|
||||||
#, no-c-format
|
#, no-c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"<![CDATA[String sql = \"SELECT ID as {c.id}, NAME as {c.name}, \" + \n"
|
"<![CDATA[String sql = \"SELECT ID as {cat.id}, NAME as {cat.name}, \" + \n"
|
||||||
" \"BIRTHDATE as {c.birthDate}, MOTHER_ID as {c.mother}, {mother.*} "
|
" \"BIRTHDATE as {cat.birthDate}, MOTHER_ID as {cat.mother}, {mother.*} "
|
||||||
"\" +\n"
|
"\" +\n"
|
||||||
" \"FROM CAT_LOG c, CAT_LOG m WHERE {c.mother} = c.ID\";\n"
|
" \"FROM CAT_LOG cat, CAT_LOG mother WHERE {cat.mother} = cat.ID\";\n"
|
||||||
"\n"
|
"\n"
|
||||||
"List loggedCats = sess.createSQLQuery(sql)\n"
|
"List loggedCats = sess.createSQLQuery(sql)\n"
|
||||||
" .addEntity(\"cat\", Cat.class)\n"
|
" .addEntity(\"cat\", Cat.class)\n"
|
||||||
|
|
|
@ -466,10 +466,10 @@ msgstr ""
|
||||||
#: query_sql.xml:192
|
#: query_sql.xml:192
|
||||||
#, no-c-format
|
#, no-c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"<![CDATA[String sql = \"SELECT ID as {c.id}, NAME as {c.name}, \" + \n"
|
"<![CDATA[String sql = \"SELECT ID as {cat.id}, NAME as {cat.name}, \" + \n"
|
||||||
" \"BIRTHDATE as {c.birthDate}, MOTHER_ID as {c.mother}, {mother.*} "
|
" \"BIRTHDATE as {cat.birthDate}, MOTHER_ID as {cat.mother}, {mother.*} "
|
||||||
"\" +\n"
|
"\" +\n"
|
||||||
" \"FROM CAT_LOG c, CAT_LOG m WHERE {c.mother} = c.ID\";\n"
|
" \"FROM CAT_LOG cat, CAT_LOG mother WHERE {cat.mother} = cat.ID\";\n"
|
||||||
"\n"
|
"\n"
|
||||||
"List loggedCats = sess.createSQLQuery(sql)\n"
|
"List loggedCats = sess.createSQLQuery(sql)\n"
|
||||||
" .addEntity(\"cat\", Cat.class)\n"
|
" .addEntity(\"cat\", Cat.class)\n"
|
||||||
|
|
|
@ -310,9 +310,9 @@ msgstr ""
|
||||||
#: query_sql.xml:216
|
#: query_sql.xml:216
|
||||||
#, no-c-format
|
#, no-c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"<![CDATA[String sql = \"SELECT ID as {c.id}, NAME as {c.name}, \" + \n"
|
"<![CDATA[String sql = \"SELECT ID as {cat.id}, NAME as {cat.name}, \" + \n"
|
||||||
" \"BIRTHDATE as {c.birthDate}, MOTHER_ID as {c.mother}, {mother.*} \" +\n"
|
" \"BIRTHDATE as {cat.birthDate}, MOTHER_ID as {cat.mother}, {mother.*} \" +\n"
|
||||||
" \"FROM CAT_LOG c, CAT_LOG m WHERE {c.mother} = c.ID\";\n"
|
" \"FROM CAT_LOG cat, CAT_LOG mother WHERE {cat.mother} = cat.ID\";\n"
|
||||||
"\n"
|
"\n"
|
||||||
"List loggedCats = sess.createSQLQuery(sql)\n"
|
"List loggedCats = sess.createSQLQuery(sql)\n"
|
||||||
" .addEntity(\"cat\", Cat.class)\n"
|
" .addEntity(\"cat\", Cat.class)\n"
|
||||||
|
|
|
@ -474,10 +474,10 @@ msgstr ""
|
||||||
#: query_sql.xml:192
|
#: query_sql.xml:192
|
||||||
#, no-c-format
|
#, no-c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"<![CDATA[String sql = \"SELECT ID as {c.id}, NAME as {c.name}, \" + \n"
|
"<![CDATA[String sql = \"SELECT ID as {cat.id}, NAME as {cat.name}, \" + \n"
|
||||||
" \"BIRTHDATE as {c.birthDate}, MOTHER_ID as {c.mother}, {mother.*} "
|
" \"BIRTHDATE as {cat.birthDate}, MOTHER_ID as {cat.mother}, {mother.*} "
|
||||||
"\" +\n"
|
"\" +\n"
|
||||||
" \"FROM CAT_LOG c, CAT_LOG m WHERE {c.mother} = c.ID\";\n"
|
" \"FROM CAT_LOG cat, CAT_LOG mother WHERE {cat.mother} = cat.ID\";\n"
|
||||||
"\n"
|
"\n"
|
||||||
"List loggedCats = sess.createSQLQuery(sql)\n"
|
"List loggedCats = sess.createSQLQuery(sql)\n"
|
||||||
" .addEntity(\"cat\", Cat.class)\n"
|
" .addEntity(\"cat\", Cat.class)\n"
|
||||||
|
|
|
@ -452,10 +452,10 @@ msgstr ""
|
||||||
#: query_sql.xml:192
|
#: query_sql.xml:192
|
||||||
#, no-c-format
|
#, no-c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"<![CDATA[String sql = \"SELECT ID as {c.id}, NAME as {c.name}, \" + \n"
|
"<![CDATA[String sql = \"SELECT ID as {cat.id}, NAME as {cat.name}, \" + \n"
|
||||||
" \"BIRTHDATE as {c.birthDate}, MOTHER_ID as {c.mother}, {mother.*} "
|
" \"BIRTHDATE as {cat.birthDate}, MOTHER_ID as {cat.mother}, {mother.*} "
|
||||||
"\" +\n"
|
"\" +\n"
|
||||||
" \"FROM CAT_LOG c, CAT_LOG m WHERE {c.mother} = c.ID\";\n"
|
" \"FROM CAT_LOG cat, CAT_LOG mother WHERE {cat.mother} = cat.ID\";\n"
|
||||||
"\n"
|
"\n"
|
||||||
"List loggedCats = sess.createSQLQuery(sql)\n"
|
"List loggedCats = sess.createSQLQuery(sql)\n"
|
||||||
" .addEntity(\"cat\", Cat.class)\n"
|
" .addEntity(\"cat\", Cat.class)\n"
|
||||||
|
|
Loading…
Reference in New Issue