renamed sequential-select to outer-join
git-svn-id: https://svn.jboss.org/repos/hibernate/trunk/Hibernate3/doc@4430 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
81ee870fb3
commit
13d1a06a51
|
@ -1905,7 +1905,7 @@
|
||||||
table="tablename"
|
table="tablename"
|
||||||
schema="owner"
|
schema="owner"
|
||||||
catalog="catalog"
|
catalog="catalog"
|
||||||
sequential-select="true|false"
|
outer-join="true|false"
|
||||||
inverse="true|false">
|
inverse="true|false">
|
||||||
|
|
||||||
<key ... />
|
<key ... />
|
||||||
|
@ -1934,8 +1934,8 @@
|
||||||
</callout>
|
</callout>
|
||||||
<callout arearefs="join4">
|
<callout arearefs="join4">
|
||||||
<para>
|
<para>
|
||||||
<literal>sequential-select</literal> (optional - defaults to <literal>false</literal>):
|
<literal>outer-join</literal> (optional - defaults to <literal>true</literal>):
|
||||||
If enabled for a join defined on a subclass, then rather than joining, a sequential
|
If disabled for a join defined on a subclass, then rather than joining, a sequential
|
||||||
select will be issued if a row turns out to represent an instance of the subclass.
|
select will be issued if a row turns out to represent an instance of the subclass.
|
||||||
</para>
|
</para>
|
||||||
</callout>
|
</callout>
|
||||||
|
|
|
@ -215,7 +215,11 @@
|
||||||
for that class. The recommended approach is to specify the class itself:
|
for that class. The recommended approach is to specify the class itself:
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<programlisting><![CDATA[<class name="eg.Order" proxy="eg.Order">]]></programlisting>
|
<programlisting><![CDATA[<class name="Order" proxy="Order">]]></programlisting>
|
||||||
|
|
||||||
|
<para>or, as a shorthand, just write <literal>lazy="true"</literal>:</para>
|
||||||
|
|
||||||
|
<programlisting><![CDATA[<class name="Order" lazy="true">]]></programlisting>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The runtime type of the proxies will be a subclass of <literal>Order</literal>. Note that
|
The runtime type of the proxies will be a subclass of <literal>Order</literal>. Note that
|
||||||
|
@ -227,9 +231,9 @@
|
||||||
classes, eg.
|
classes, eg.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<programlisting><![CDATA[<class name="eg.Cat" proxy="eg.Cat">
|
<programlisting><![CDATA[<class name="Cat" proxy="Cat">
|
||||||
......
|
......
|
||||||
<subclass name="eg.DomesticCat" proxy="eg.DomesticCat">
|
<subclass name="DomesticCat" proxy="DomesticCat">
|
||||||
.....
|
.....
|
||||||
</subclass>
|
</subclass>
|
||||||
</class>]]></programlisting>
|
</class>]]></programlisting>
|
||||||
|
@ -281,9 +285,9 @@ System.out.println( dc.getWeight() ); // 11.0]]></programlisting>
|
||||||
that declares its business methods. You should specify these interfaces in the mapping file. eg.
|
that declares its business methods. You should specify these interfaces in the mapping file. eg.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<programlisting><![CDATA[<class name="eg.Cat" proxy="eg.ICat">
|
<programlisting><![CDATA[<class name="CatImpl" proxy="Cat">
|
||||||
......
|
......
|
||||||
<subclass name="eg.DomesticCat" proxy="eg.IDomesticCat">
|
<subclass name="DomesticCatImpl" proxy="DomesticCat">
|
||||||
.....
|
.....
|
||||||
</subclass>
|
</subclass>
|
||||||
</class>]]></programlisting>
|
</class>]]></programlisting>
|
||||||
|
@ -293,16 +297,16 @@ System.out.println( dc.getWeight() ); // 11.0]]></programlisting>
|
||||||
<literal>DomesticCat</literal> implements the interface <literal>IDomesticCat</literal>. Then
|
<literal>DomesticCat</literal> implements the interface <literal>IDomesticCat</literal>. Then
|
||||||
proxies for instances of <literal>Cat</literal> and <literal>DomesticCat</literal> may be returned
|
proxies for instances of <literal>Cat</literal> and <literal>DomesticCat</literal> may be returned
|
||||||
by <literal>load()</literal> or <literal>iterate()</literal>. (Note that <literal>find()</literal>
|
by <literal>load()</literal> or <literal>iterate()</literal>. (Note that <literal>find()</literal>
|
||||||
does not return proxies.)
|
does not usually return proxies.)
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<programlisting><![CDATA[ICat cat = (ICat) session.load(Cat.class, catid);
|
<programlisting><![CDATA[Cat cat = (Cat) session.load(CatImpl.class, catid);
|
||||||
Iterator iter = session.iterate("from cat in class eg.Cat where cat.name='fritz'");
|
Iterator iter = session.iterate("from cat in class CatImpl where cat.name='fritz'");
|
||||||
ICat fritz = (ICat) iter.next();]]></programlisting>
|
Cat fritz = (Cat) iter.next();]]></programlisting>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Relationships are also lazily initialized. This means you must declare any properties to be of
|
Relationships are also lazily initialized. This means you must declare any properties to be of
|
||||||
type <literal>ICat</literal>, not <literal>Cat</literal>.
|
type <literal>Cat</literal>, not <literal>CatImpl</literal>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
@ -534,7 +538,7 @@ ICat fritz = (ICat) iter.next();]]></programlisting>
|
||||||
<entry><literal>org.hibernate.cache.TreeCacheProvider</literal></entry>
|
<entry><literal>org.hibernate.cache.TreeCacheProvider</literal></entry>
|
||||||
<entry>clustered (ip multicast), transactional</entry>
|
<entry>clustered (ip multicast), transactional</entry>
|
||||||
<entry>yes (replication)</entry>
|
<entry>yes (replication)</entry>
|
||||||
<entry></entry>
|
<entry>yes</entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
|
@ -716,9 +720,12 @@ ICat fritz = (ICat) iter.next();]]></programlisting>
|
||||||
<para>
|
<para>
|
||||||
Whenever you pass an object to <literal>save()</literal>, <literal>update()</literal>
|
Whenever you pass an object to <literal>save()</literal>, <literal>update()</literal>
|
||||||
or <literal>saveOrUpdate()</literal> and whenever you retrieve an object using
|
or <literal>saveOrUpdate()</literal> and whenever you retrieve an object using
|
||||||
<literal>load()</literal>, <literal>find()</literal>, <literal>iterate()</literal>,
|
<literal>load()</literal>, <literal>get()</literal>, <literal>list()</literal>,
|
||||||
or <literal>filter()</literal>, that object is added to the internal cache of the
|
<literal>iterate()</literal> or <literal>scroll()</literal>, that object is added
|
||||||
<literal>Session</literal>. When <literal>flush()</literal> is subsequently called,
|
to the internal cache of the <literal>Session</literal>.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
When <literal>flush()</literal> is subsequently called,
|
||||||
the state of that object will be synchronized with the database. If you do not want
|
the state of that object will be synchronized with the database. If you do not want
|
||||||
this synchronization to occur or if you are processing a huge number of objects and
|
this synchronization to occur or if you are processing a huge number of objects and
|
||||||
need to manage memory efficiently, the <literal>evict()</literal> method may be
|
need to manage memory efficiently, the <literal>evict()</literal> method may be
|
||||||
|
|
Loading…
Reference in New Issue