server/sources/__init__.py
changeset 2596 d02eed70937f
parent 2493 9806571ea790
child 2625 d6012db7b93e
--- a/server/sources/__init__.py	Fri Jul 31 23:27:53 2009 +0200
+++ b/server/sources/__init__.py	Fri Jul 31 23:30:56 2009 +0200
@@ -12,6 +12,7 @@
 from logging import getLogger
 
 from cubicweb import set_log_methods
+from cubicweb.schema import VIRTUAL_RTYPES
 from cubicweb.server.sqlutils import SQL_PREFIX
 
 
@@ -201,7 +202,7 @@
         # delete relations referencing one of those eids
         eidcolum = SQL_PREFIX + 'eid'
         for rschema in self.schema.relations():
-            if rschema.is_final() or rschema.type == 'identity':
+            if rschema.is_final() or rschema.type in VIRTUAL_RTYPES:
                 continue
             if rschema.inlined:
                 column = SQL_PREFIX + rschema.type