Update of /cvsroot/webware/Webware/MiddleKit/Core
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29555/Core
Modified Files:
Klass.py
Log Message:
- Allow users to stop SQL foreign key reference generation for an attr with
Ref=0 (or Ref=False). This is important for breaking circular refs which
are not currently supported.
Index: Klass.py
===================================================================
RCS file: /cvsroot/webware/Webware/MiddleKit/Core/Klass.py,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** Klass.py 20 Jul 2004 16:34:37 -0000 1.25
--- Klass.py 25 Aug 2004 15:45:22 -0000 1.26
***************
*** 362,366 ****
if isinstance(attr, ObjRefAttr):
targetKlass = attr.targetKlass()
! if targetKlass is not self and not sorter.visitedKlasses.has_key(targetKlass):
targetKlass.sortByDependency(sorter) # recursive call
# end of the dependency road
--- 362,366 ----
if isinstance(attr, ObjRefAttr):
targetKlass = attr.targetKlass()
! if targetKlass is not self and not sorter.visitedKlasses.has_key(targetKlass) and attr.boolForKey('Ref', True):
targetKlass.sortByDependency(sorter) # recursive call
# end of the dependency road
|