cubicweb/server/repository.py
changeset 11129 97095348b3ee
parent 11090 b4b854c25de5
parent 11057 0b59724cb3f2
child 11195 5de859b95988
--- a/cubicweb/server/repository.py	Thu Feb 11 21:59:49 2016 +0100
+++ b/cubicweb/server/repository.py	Wed Feb 17 13:45:34 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')