Hi,

I would to know when I execute a session.evict() on an Object that contains
many-to-one relation, if automatically all 'linked' element are also evicted
or if I have to apply the evict method to all linked object. In my case, I
have a Document element that contains first a self reference on it
(parent/child relation) and others linked elements that are stored into
separate tables. Here is partially my hibernate mapping.

   <class name="Document" table="doc" dynamic-update="true">
      <id column="oid" name="oid" type="java.lang.String"
unsaved-value="none">
         <generator class="assigned"/>
      </id>
      <many-to-one name="ebatch" column="batchoid" class="EBatch"/>
      <set name="children" inverse="true" lazy="true" cascade="all">
         <key column="parent"/>
         <one-to-many class="Document"/>
      </set>
      <many-to-one name="parent" column="parent" cascade="all"
class="Document"/>

      <set name="encodings" cascade="all" inverse="true">
          <key column="refobjoid"/>
          <one-to-many class="imtf.ch.atlas.capture.data.Encoding"/>
      </set>

   </class>

Regards. Yvan

PS: In any case this feature should be better documented.

Yvan Hess
Chief Software Architect

e-mail: [EMAIL PROTECTED]
phone : +41 (0)26 460 66 66 
fax   : +41 (0)26 460 66 60 

Informatique-MTF SA
Route du Bleuet 1 
CH-1762 Givisiez 
        
Systemintegrators for eDocuments 
http://www.imtf.com




-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to