Hi,
I have a product that stores customer information in mysql using
ZSQLMethods. 
I would like each customer to have a different mysql database (same
structure), but all use the same ZSQLMethods for access.
So, I tried the following:
/ - root contains ZSQLMethods and default DB Connector (seems to be
required for editing the methods)
/CustomerA - contains DB Connector with same name as in root, but uses
different mysql database
/CustomerB - contains DB Connector with same name as in root, but uses
different mysql database

And assumed that /CustomerA/showdata would use the DB Connector in the
'CustomerA' directory, but no matter what it uses the DB Connector in
the root directory.  It seems that the ZSQLMethods namespace is put on
top and any other DB Connectors are ignored.
Is this intentional or a bug?

I can patch Shared.DC.ZRDB.DA with the following:

try: nsCid = getattr(aq_parent(self), self.connection_id)
except: ns = self
else: ns = aq_parent(self)
                
#try: dbc=getattr(self, self.connection_id) <---<<< old code
try: dbc=getattr(ns, self.connection_id)

Is this the only way to solve the problem? 
I hate to add a patch to get what would seem to me to be the correct
functionality.

Thanks,
Jeff

_______________________________________________
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to