Update of /cvsroot/modeling/ProjectModeling/Modeling
In directory sc8-pr-cvs1:/tmp/cvs-serv22190
Modified Files:
Model.py
Log Message:
Changed docstring: MDL_ENABLE_SIMPLE_METHOD_CACHE should be set to enable caching of models (see utils) + fixed: caching should not iterate on joins when a relationship is flattened + removed isaValidEntityName()
Index: Model.py
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/Model.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Model.py 23 Jul 2003 21:09:26 -0000 1.9
--- Model.py 24 Jul 2003 11:10:53 -0000 1.10
***************
*** 272,278 ****
and caches the result of methods taking only one argument ('self').
! This can be disabled by setting the environment variable
! MDL_DISABLE_SIMPLE_METHOD_CACHE to any non-empty string; you want to
! disable it when you manipulate models at runtime, for example in a model
designer.
--- 272,278 ----
and caches the result of methods taking only one argument ('self').
! This needs to be enabled by setting the environment variable
! MDL_ENABLE_SIMPLE_METHOD_CACHE to any non-empty string; you want to leave
! it disabled when you manipulate models at runtime, for example in a model
designer.
***************
*** 284,289 ****
cache_simple_methods(a)
for r in e.relationships():
! for j in r.joins():
! cache_simple_methods(j)
cache_simple_methods(r)
cache_simple_methods(e)
--- 284,290 ----
cache_simple_methods(a)
for r in e.relationships():
! if not r.isFlattened():
! for j in r.joins():
! cache_simple_methods(j)
cache_simple_methods(r)
cache_simple_methods(e)
***************
*** 345,357 ****
return map(lambda o: o.name(), self.entities())
! def isaValidEntityName(self):
! """
! **Unimplemented** for the moment being (raise NotImplementedError)
! Returns 'true' if modelSet() is 'None', or if modelSet() does not
! hold another model where an entity is already registered with the
! same name.
! """
! # _TBD: bound to check + called by ModelSet when a Model is added
! raise NotImplementedError
def isEntityNameDeclaredInNamespace(self, aName):
--- 346,358 ----
return map(lambda o: o.name(), self.entities())
! #def isaValidEntityName(self):
! # """
! # **Unimplemented** for the moment being (raise NotImplementedError)
! # Returns 'true' if modelSet() is 'None', or if modelSet() does not
! # hold another model where an entity is already registered with the
! # same name.
! # """
! # # _TBD: bound to check + called by ModelSet when a Model is added
! # raise NotImplementedError
def isEntityNameDeclaredInNamespace(self, aName):
|