|
From: <one...@us...> - 2002-11-19 10:42:20
|
Update of /cvsroot/hibernate/Hibernate/doc/reference/html
In directory sc8-pr-cvs1:/tmp/cvs-serv22505/doc/reference/html
Modified Files:
or-mapping.html
Log Message:
added polymorphism attribute to <class> element
Index: or-mapping.html
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/doc/reference/html/or-mapping.html,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** or-mapping.html 16 Nov 2002 13:40:30 -0000 1.32
--- or-mapping.html 19 Nov 2002 10:42:17 -0000 1.33
***************
*** 63,66 ****
--- 63,67 ----
schema="owner"
proxy="ProxyInterface"
+ polymorphism="implicit|explicit"
persister="PersisterClass" /></pre><p>
The attributes have the following interpretations:
***************
*** 81,86 ****
</p></li><li><p>
<tt>proxy</tt> (optional): Specifies an interface to use for lazy
! initializing proxies (JDK 1.3+ only). If the class has no subclasses, you
! may specify the name of the class itself.
</p></li><li><p>
<tt>persister</tt> (optional): Specifies a custom <tt>ClassPersister</tt>.
--- 82,89 ----
</p></li><li><p>
<tt>proxy</tt> (optional): Specifies an interface to use for lazy
! initializing proxies. You may specify the name of the class itself.
! </p></li><li><p>
! <tt>polymorphism</tt> (optional, defaults to <tt>implicit</tt>):
! Determines whether implicit or explicit query polymorphism is used.
</p></li><li><p>
<tt>persister</tt> (optional): Specifies a custom <tt>ClassPersister</tt>.
***************
*** 97,100 ****
--- 100,113 ----
the named interface. The actual persistent object will be loaded when a method of the
proxy is invoked. See "Proxies for Lazy Initialization" below.
+ </p><p><span class="emphasis"><em>Implicit</em></span> polymorphism means that instances of the class will be returned
+ by a query that names any superclass or implemented interface or the class and that instances
+ of any subclass of the class will be returned by a query that names the class itself.
+ <span class="emphasis"><em>Explicit</em></span> polymorphism means that class instances will be returned only
+ be queries that explicitly name that class and that queries that name the class will return
+ only instances of subclasses mapped inside this <tt><class></tt> declaration
+ as a <tt><subclass></tt> or <tt><joined-subclass></tt>. For
+ most purposes the default, <tt>polymorphism="implicit"</tt>, is appropriate.
+ Explicit polymorphism is useful when two different classes are mapped to the same table
+ (this allows a "lightweight" class that contains a subset of the table columns).
</p><p>
The <tt>persister</tt> attribute lets you customize the persistence strategy used for
***************
*** 457,462 ****
value that distiguishes individual subclasses.
</p></li><li><p>
! <tt>proxy</tt> (optional): Specifies an interface to use for lazy
! initializing proxies (JDK 1.3+ only).
</p></li></ul></div><p>
Each subclass should declare its own persistent properties and subclasses.
--- 470,475 ----
value that distiguishes individual subclasses.
</p></li><li><p>
! <tt>proxy</tt> (optional): Specifies a class or interface to use for
! lazy initializing proxies.
</p></li></ul></div><p>
Each subclass should declare its own persistent properties and subclasses.
***************
*** 479,484 ****
<tt>name</tt>: The fully qualified class name of the subclass.
</p></li><li><p>
! <tt>proxy</tt> (optional): Specifies an interface to use for lazy
! initializing proxies (JDK 1.3+ only).
</p></li></ul></div><p>
No discriminator column is required for this mapping strategy. Each subclass must,
--- 492,497 ----
<tt>name</tt>: The fully qualified class name of the subclass.
</p></li><li><p>
! <tt>proxy</tt> (optional): Specifies a class or interface to use
! for lazy initializing proxies.
</p></li></ul></div><p>
No discriminator column is required for this mapping strategy. Each subclass must,
|