[Zope] Zope Connections and Python Classes

Chui Tey Chui.Tey@env.qld.gov.au
Mon, 04 Oct 1999 14:34:22 +1000


My python product code is structured somewhat like this:

class A:
  __init__ (self, connection_id)
    self.B = B(connection_id)
    self.C = C(connection_id)
    self.sqlquery = SQL(...

class B:
  __init__ (self, connection_id)
    self.connection_id = connection_id
    self.sqlquery=SQL(...
	
class C:
  __init__ (self, connection_id)
    self.connection_id = connection_id
    self.sqlquery=SQL(...

def manage_addA(self, id, connection_id):
    ob = A(connection_id)
    self._setObject(id, ob)

This works:
   Zope/instanceA/sqlquery
  
now trying to do this from Zope,
   Zope/instanceA/B/sqlquery

yields an error message that connection_id chosen is not available. What
am I missing? Any workarounds?