[HHH-2719] adddress --> address

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@12763 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Diego Plentz 2007-07-13 04:14:38 +00:00
parent 24eaebf6aa
commit 0abce7883b
7 changed files with 96 additions and 96 deletions

View File

@ -425,12 +425,12 @@ List pusList = query.setString("name", "Pus%").list(); ]]></programlist
SELECT person.NAME AS {person.name},
person.AGE AS {person.age},
person.SEX AS {person.sex},
adddress.STREET AS {address.street},
adddress.CITY AS {address.city},
adddress.STATE AS {address.state},
adddress.ZIP AS {address.zip}
address.STREET AS {address.street},
address.CITY AS {address.city},
address.STATE AS {address.state},
address.ZIP AS {address.zip}
FROM PERSON person
JOIN ADDRESS adddress
JOIN ADDRESS address
ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'
WHERE person.NAME LIKE :namePattern
</sql-query>]]></programlisting>
@ -461,12 +461,12 @@ List pusList = query.setString("name", "Pus%").list(); ]]></programlist
SELECT person.NAME AS {person.name},
person.AGE AS {person.age},
person.SEX AS {person.sex},
adddress.STREET AS {address.street},
adddress.CITY AS {address.city},
adddress.STATE AS {address.state},
adddress.ZIP AS {address.zip}
address.STREET AS {address.street},
address.CITY AS {address.city},
address.STATE AS {address.state},
address.ZIP AS {address.zip}
FROM PERSON person
JOIN ADDRESS adddress
JOIN ADDRESS address
ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'
WHERE person.NAME LIKE :namePattern
</sql-query>]]></programlisting>

View File

@ -139,12 +139,12 @@ List loggedCats = sess.createSQLQuery(sql)
SELECT person.NAME AS {person.name},
person.AGE AS {person.age},
person.SEX AS {person.sex},
adddress.STREET AS {address.street},
adddress.CITY AS {address.city},
adddress.STATE AS {address.state},
adddress.ZIP AS {address.zip}
address.STREET AS {address.street},
address.CITY AS {address.city},
address.STATE AS {address.state},
address.ZIP AS {address.zip}
FROM PERSON person
JOIN ADDRESS adddress
JOIN ADDRESS address
ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'
WHERE person.NAME LIKE :namePattern
</sql-query>]]></programlisting>

View File

@ -276,12 +276,12 @@ List loggedCats = sess.createSQLQuery(sql)
SELECT person.NAME AS {person.name},
person.AGE AS {person.age},
person.SEX AS {person.sex},
adddress.STREET AS {address.street},
adddress.CITY AS {address.city},
adddress.STATE AS {address.state},
adddress.ZIP AS {address.zip}
address.STREET AS {address.street},
address.CITY AS {address.city},
address.STATE AS {address.state},
address.ZIP AS {address.zip}
FROM PERSON person
JOIN ADDRESS adddress
JOIN ADDRESS address
ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'
WHERE person.NAME LIKE :namePattern
&lt;/sql-query&gt;</programlisting>
@ -315,12 +315,12 @@ List loggedCats = sess.createSQLQuery(sql)
SELECT person.NAME AS {person.name},
person.AGE AS {person.age},
person.SEX AS {person.sex},
adddress.STREET AS {address.street},
adddress.CITY AS {address.city},
adddress.STATE AS {address.state},
adddress.ZIP AS {address.zip}
address.STREET AS {address.street},
address.CITY AS {address.city},
address.STATE AS {address.state},
address.ZIP AS {address.zip}
FROM PERSON person
JOIN ADDRESS adddress
JOIN ADDRESS address
ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'
WHERE person.NAME LIKE :namePattern
&lt;/sql-query&gt;</programlisting>

View File

@ -391,12 +391,12 @@ List pusList = query.setString("name", "Pus%").list(); ]]></programlist
SELECT person.NAME AS {person.name},
person.AGE AS {person.age},
person.SEX AS {person.sex},
adddress.STREET AS {address.street},
adddress.CITY AS {address.city},
adddress.STATE AS {address.state},
adddress.ZIP AS {address.zip}
address.STREET AS {address.street},
address.CITY AS {address.city},
address.STATE AS {address.state},
address.ZIP AS {address.zip}
FROM PERSON person
JOIN ADDRESS adddress
JOIN ADDRESS address
ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'
WHERE person.NAME LIKE :namePattern
</sql-query>]]></programlisting>
@ -429,12 +429,12 @@ List pusList = query.setString("name", "Pus%").list(); ]]></programlist
SELECT person.NAME AS {person.name},
person.AGE AS {person.age},
person.SEX AS {person.sex},
adddress.STREET AS {address.street},
adddress.CITY AS {address.city},
adddress.STATE AS {address.state},
adddress.ZIP AS {address.zip}
address.STREET AS {address.street},
address.CITY AS {address.city},
address.STATE AS {address.state},
address.ZIP AS {address.zip}
FROM PERSON person
JOIN ADDRESS adddress
JOIN ADDRESS address
ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'
WHERE person.NAME LIKE :namePattern
</sql-query>]]></programlisting>

View File

@ -394,12 +394,12 @@ List pusList = query.setString("name", "Pus%").list(); ]]></programlist
SELECT person.NAME AS {person.name},
person.AGE AS {person.age},
person.SEX AS {person.sex},
adddress.STREET AS {address.street},
adddress.CITY AS {address.city},
adddress.STATE AS {address.state},
adddress.ZIP AS {address.zip}
address.STREET AS {address.street},
address.CITY AS {address.city},
address.STATE AS {address.state},
address.ZIP AS {address.zip}
FROM PERSON person
JOIN ADDRESS adddress
JOIN ADDRESS address
ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'
WHERE person.NAME LIKE :namePattern
</sql-query>]]></programlisting>
@ -428,12 +428,12 @@ List pusList = query.setString("name", "Pus%").list(); ]]></programlist
SELECT person.NAME AS {person.name},
person.AGE AS {person.age},
person.SEX AS {person.sex},
adddress.STREET AS {address.street},
adddress.CITY AS {address.city},
adddress.STATE AS {address.state},
adddress.ZIP AS {address.zip}
address.STREET AS {address.street},
address.CITY AS {address.city},
address.STATE AS {address.state},
address.ZIP AS {address.zip}
FROM PERSON person
JOIN ADDRESS adddress
JOIN ADDRESS address
ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'
WHERE person.NAME LIKE :namePattern
</sql-query>]]></programlisting>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml version="1.0" encoding="ISO-8859-1"?>
<chapter id="querysql" revision="2">
<title>Native SQL</title>
@ -425,12 +425,12 @@ List pusList = query.setString("name", "Pus%").list(); ]]></programlist
SELECT person.NAME AS {person.name},
person.AGE AS {person.age},
person.SEX AS {person.sex},
adddress.STREET AS {address.street},
adddress.CITY AS {address.city},
adddress.STATE AS {address.state},
adddress.ZIP AS {address.zip}
address.STREET AS {address.street},
address.CITY AS {address.city},
address.STATE AS {address.state},
address.ZIP AS {address.zip}
FROM PERSON person
JOIN ADDRESS adddress
JOIN ADDRESS address
ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'
WHERE person.NAME LIKE :namePattern
</sql-query>]]></programlisting>
@ -461,12 +461,12 @@ List pusList = query.setString("name", "Pus%").list(); ]]></programlist
SELECT person.NAME AS {person.name},
person.AGE AS {person.age},
person.SEX AS {person.sex},
adddress.STREET AS {address.street},
adddress.CITY AS {address.city},
adddress.STATE AS {address.state},
adddress.ZIP AS {address.zip}
address.STREET AS {address.street},
address.CITY AS {address.city},
address.STATE AS {address.state},
address.ZIP AS {address.zip}
FROM PERSON person
JOIN ADDRESS adddress
JOIN ADDRESS address
ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'
WHERE person.NAME LIKE :namePattern
</sql-query>]]></programlisting>
@ -601,10 +601,10 @@ BEGIN
<itemizedlist spacing="compact">
<listitem>
<para>
A funçãp deve retornar um result set. O primeiro parâmetro da procedure
dever ser uma <literal>SAÍDA</literal> que retorne um result set. Isto é feito
usando o tipo a <literal>SYS_REFCURSOR</literal> no Oracle 9 ou 10. No Oracle é
necessário definir o tipo <literal>REF CURSOR</literal>, veja a documentação do Oracle.
A funçãp deve retornar um result set. O primeiro parâmetro da procedure
dever ser uma <literal>SAÍDA</literal> que retorne um result set. Isto é feito
usando o tipo a <literal>SYS_REFCURSOR</literal> no Oracle 9 ou 10. No Oracle é
necessário definir o tipo <literal>REF CURSOR</literal>, veja a documentação do Oracle.
</para>
</listitem>
</itemizedlist>
@ -615,16 +615,16 @@ BEGIN
<listitem>
<para>
A procedure deve retornar um result set. Veja que este servidor pode retornar
múltiplos result sets e update counts. O Hibernate ira iterar os resultados e
pegar o primeiro resultado que é o valor de retorno do result set.
O resto será descartado.
múltiplos result sets e update counts. O Hibernate ira iterar os resultados e
pegar o primeiro resultado que é o valor de retorno do result set.
O resto será descartado.
</para>
</listitem>
<listitem>
<para>
Se você habilitar <literal>SET NOCOUNT ON</literal> na sua procedure, ela
provavelmente será mais eficiente. Mas, isto não é obrigatório</para>
Se você habilitar <literal>SET NOCOUNT ON</literal> na sua procedure, ela
provavelmente será mais eficiente. Mas, isto não é obrigatório</para>
</listitem>
</itemizedlist>
</sect3>
@ -642,9 +642,9 @@ BEGIN
<literal>&lt;sql-delete&gt;</literal>, and
<literal>&lt;sql-update&gt;</literal> override these strings:
Hibernate3 pode usar SQL customizado para operações de create, update e delete.
A persistência de classe e collection no hibernate já contem alguma strings
de configurações (insertsql, deletesql, updatesql etc.).
Hibernate3 pode usar SQL customizado para operações de create, update e delete.
A persistência de classe e collection no hibernate já contem alguma strings
de configurações (insertsql, deletesql, updatesql etc.).
O mapaemento das tags
<literal>&lt;sql-insert&gt;</literal>,
<literal>&lt;sql-delete&gt;</literal>, e
@ -663,13 +663,13 @@ BEGIN
</class>]]></programlisting>
<para>
O SQL é executado diretamente no seu banco de dados, então você pode usar qualquer
O SQL é executado diretamente no seu banco de dados, então você pode usar qualquer
linguagem que quiser. Isto com certeza reduzira a portabilidade do seu mapeamento se
você utilizar um SQL para um banco de dados especifico.
você utilizar um SQL para um banco de dados especifico.
</para>
<para>
Stored Procedures são suportadas se o atributo the
Stored Procedures são suportadas se o atributo the
<literal>callable</literal> estiver ativado:
</para>
@ -684,22 +684,22 @@ BEGIN
</class>]]></programlisting>
<para>
A ordem de posições dos parâmetros são vitais, pois eles devem estar na mesma seqüência
A ordem de posições dos parâmetros são vitais, pois eles devem estar na mesma seqüência
esperada pelo Hibernate.
</para>
<para>Você pode ver a ordem esperada ativando o debug logging no nível
<literal>org.hibernate.persister.entity</literal>. Com este nível ativado, o Hibernate
irá imprimir o SQL estático que foi usado para create, update, delete, etc.
Entidades. (Para ver a seqüência esperada, lembre-se de não incluir seu SQL
customizado no arquivo de mapeamento, pois ele irá sobreecreve o SQL
estático gerado pelo Hibernate).
<para>Você pode ver a ordem esperada ativando o debug logging no nível
<literal>org.hibernate.persister.entity</literal>. Com este nível ativado, o Hibernate
irá imprimir o SQL estático que foi usado para create, update, delete, etc.
Entidades. (Para ver a seqüência esperada, lembre-se de não incluir seu SQL
customizado no arquivo de mapeamento, pois ele irá sobreecreve o SQL
estático gerado pelo Hibernate).
</para>
<para>As stored procedures são na maioria dos casos (leia: melhor não fazer) requeridas para
<para>As stored procedures são na maioria dos casos (leia: melhor não fazer) requeridas para
retornar o numero de linhas inseridas/atualizadas/deletadas. O hibernate tem algumas
verificações em tempo de execução para o sucesso da declaração. Hibernate sempre registra
o primeiro parâmetro da declaração como uma saída numérica para operações CRUD.
verificações em tempo de execução para o sucesso da declaração. Hibernate sempre registra
o primeiro parâmetro da declaração como uma saída numérica para operações CRUD.
</para>
<programlisting><![CDATA[CREATE OR REPLACE FUNCTION updatePerson (uid IN NUMBER, uname IN VARCHAR2)
@ -723,7 +723,7 @@ END updatePerson;]]>
<title>SQL customizado para carga</title>
<para>
Você pode declarar sua própria query SQL (ou HQL) para iniciar entidades:
Você pode declarar sua própria query SQL (ou HQL) para iniciar entidades:
</para>
<programlisting><![CDATA[<sql-query name="person">
@ -735,8 +735,8 @@ END updatePerson;]]>
</sql-query>]]></programlisting>
<para>
Este é apenas uma declaração de query com nome, como discutido anteriormente.
Você pode referenciar esta query com nome em um mapeamento de classe:
Este é apenas uma declaração de query com nome, como discutido anteriormente.
Você pode referenciar esta query com nome em um mapeamento de classe:
</para>
<programlisting><![CDATA[<class name="Person">
@ -747,10 +747,10 @@ END updatePerson;]]>
<loader query-ref="person"/>
</class>]]></programlisting>
<para>Isto também funciona com stored procedures.
<para>Isto também funciona com stored procedures.
</para>
<para>Você pode tembém definir uma query para iniciar collection:
<para>Você pode tembém definir uma query para iniciar collection:
</para>
<programlisting><![CDATA[<set name="employments" inverse="true">

View File

@ -377,12 +377,12 @@ List pusList = query.setString("name", "Pus%").list(); ]]></programlist
SELECT person.NAME AS {person.name},
person.AGE AS {person.age},
person.SEX AS {person.sex},
adddress.STREET AS {address.street},
adddress.CITY AS {address.city},
adddress.STATE AS {address.state},
adddress.ZIP AS {address.zip}
address.STREET AS {address.street},
address.CITY AS {address.city},
address.STATE AS {address.state},
address.ZIP AS {address.zip}
FROM PERSON person
JOIN ADDRESS adddress
JOIN ADDRESS address
ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'
WHERE person.NAME LIKE :namePattern
</sql-query>]]></programlisting>
@ -417,12 +417,12 @@ List pusList = query.setString("name", "Pus%").list(); ]]></programlist
SELECT person.NAME AS {person.name},
person.AGE AS {person.age},
person.SEX AS {person.sex},
adddress.STREET AS {address.street},
adddress.CITY AS {address.city},
adddress.STATE AS {address.state},
adddress.ZIP AS {address.zip}
address.STREET AS {address.street},
address.CITY AS {address.city},
address.STATE AS {address.state},
address.ZIP AS {address.zip}
FROM PERSON person
JOIN ADDRESS adddress
JOIN ADDRESS address
ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'
WHERE person.NAME LIKE :namePattern
</sql-query>]]></programlisting>