[schema] consider ETYPE_NAME_MAP when deserializing specialization relations stable
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Mon, 09 Aug 2010 18:48:32 +0200
branchstable
changeset 6080 d0cb8fde4957
parent 6079 bd7e3042791e
child 6083 8d69ef5f086a
[schema] consider ETYPE_NAME_MAP when deserializing specialization relations
server/schemaserial.py
--- a/server/schemaserial.py	Mon Aug 09 16:35:49 2010 +0200
+++ b/server/schemaserial.py	Mon Aug 09 18:48:32 2010 +0200
@@ -152,6 +152,8 @@
     for etype, stype in session.execute(
         'Any XN, ETN WHERE X is CWEType, X name XN, X specializes ET, ET name ETN',
         build_descr=False):
+        etype = ETYPE_NAME_MAP.get(etype, etype)
+        stype = ETYPE_NAME_MAP.get(stype, stype)
         schema.eschema(etype)._specialized_type = stype
         schema.eschema(stype)._specialized_by.append(etype)
     for eid, rtype, desc, sym, il, ftc in session.execute(