server/repository.py
changeset 11090 b4b854c25de5
parent 11008 de86c6592cc7
--- a/server/repository.py	Fri Jan 29 10:06:36 2016 +0100
+++ b/server/repository.py	Thu Jan 28 18:17:30 2016 +0100
@@ -226,6 +226,11 @@
             if not config.creating:
                 self.info("set fs instance'schema")
             self.set_schema(config.load_schema(expand_cubes=True))
+            if not config.creating:
+                # set eids on entities schema
+                with self.internal_cnx() as cnx:
+                    for etype, eid in cnx.execute('Any XN,X WHERE X is CWEType, X name XN'):
+                        self.schema.eschema(etype).eid = eid
         else:
             # normal start: load the instance schema from the database
             self.info('loading schema from the repository')