Index: kernel/classes/datatypes/ezobjectrelation/ezobjectrelationtype.php
===================================================================
--- kernel/classes/datatypes/ezobjectrelation/ezobjectrelationtype.php	(révision 854)
+++ kernel/classes/datatypes/ezobjectrelation/ezobjectrelationtype.php	(copie de travail)
@@ -656,6 +656,48 @@
         return true;
     }
 
+    function fixRelatedObjectItem ( $contentObjectAttribute, $objectID, $mode )
+    {
+        switch ( $mode )
+        {
+            case 'trash':
+            {
+                $this->fixRelationsTrash( $objectID, $contentObjectAttribute );
+            } break;
+
+            case 'restore':
+            {
+                $this->fixRelationsRestore( $objectID, $contentObjectAttribute );
+            } break;
+
+            case 'remove':
+            {
+                $this->fixRelationsRemove( $objectID, $contentObjectAttribute );
+            } break;
+
+            default:
+            {
+                eZDebug::writeWarning( 'Unknown mode: ' . $mode, __METHOD__ );
+            } break;
+        }
+    }
+    function fixRelationsTrash ( $objectID, $contentObjectAttribute )
+    {
+        // Do nothing if we want to be able to restore object
+        // and have relation still working
+        // as there is no 'in_trash' property like in ezobjectrelationlist datatype
+    }
+
+    function fixRelationsRestore ( $objectID, $contentObjectAttribute )
+    {
+        // Do nothing as relation is still there
+    }
+
+    function fixRelationsRemove ( $objectID, $contentObjectAttribute )
+    {
+        $this->removeRelatedObjectItem( $contentObjectAttribute, $objectID );
+        $contentObjectAttribute->storeData();
+    }
     /// \privatesection
 }
 
