server/sources/__init__.py
changeset 2596 d02eed70937f
parent 2493 9806571ea790
child 2625 d6012db7b93e
equal deleted inserted replaced
2595:e76bf303c6f2 2596:d02eed70937f
    10 from os.path import join, splitext
    10 from os.path import join, splitext
    11 from datetime import datetime, timedelta
    11 from datetime import datetime, timedelta
    12 from logging import getLogger
    12 from logging import getLogger
    13 
    13 
    14 from cubicweb import set_log_methods
    14 from cubicweb import set_log_methods
       
    15 from cubicweb.schema import VIRTUAL_RTYPES
    15 from cubicweb.server.sqlutils import SQL_PREFIX
    16 from cubicweb.server.sqlutils import SQL_PREFIX
    16 
    17 
    17 
    18 
    18 
    19 
    19 class TimedCache(dict):
    20 class TimedCache(dict):
   199         if not myeids:
   200         if not myeids:
   200             return
   201             return
   201         # delete relations referencing one of those eids
   202         # delete relations referencing one of those eids
   202         eidcolum = SQL_PREFIX + 'eid'
   203         eidcolum = SQL_PREFIX + 'eid'
   203         for rschema in self.schema.relations():
   204         for rschema in self.schema.relations():
   204             if rschema.is_final() or rschema.type == 'identity':
   205             if rschema.is_final() or rschema.type in VIRTUAL_RTYPES:
   205                 continue
   206                 continue
   206             if rschema.inlined:
   207             if rschema.inlined:
   207                 column = SQL_PREFIX + rschema.type
   208                 column = SQL_PREFIX + rschema.type
   208                 for subjtype in rschema.subjects():
   209                 for subjtype in rschema.subjects():
   209                     table = SQL_PREFIX + str(subjtype)
   210                     table = SQL_PREFIX + str(subjtype)