[Erp5-report] r26536 - /erp5/trunk/products/ZSQLCatalog/ColumnMap.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Apr 21 10:15:47 CEST 2009
Author: vincent
Date: Tue Apr 21 10:15:46 2009
New Revision: 26536
URL: http://svn.erp5.org?rev=26536&view=rev
Log:
Remove a log requiring unimplemented features to be present to be fixed.
Replace it by a docstring explaining why this method is Bad, and how it should be improved.
Modified:
erp5/trunk/products/ZSQLCatalog/ColumnMap.py
Modified: erp5/trunk/products/ZSQLCatalog/ColumnMap.py
URL: http://svn.erp5.org/erp5/trunk/products/ZSQLCatalog/ColumnMap.py?rev=26536&r1=26535&r2=26536&view=diff
==============================================================================
--- erp5/trunk/products/ZSQLCatalog/ColumnMap.py [utf8] (original)
+++ erp5/trunk/products/ZSQLCatalog/ColumnMap.py [utf8] Tue Apr 21 10:15:46 2009
@@ -151,8 +151,22 @@
@profiler_decorator
def registerCatalog(self):
+ """
+ Register catalog as being in use in query, and aliased with its own
+ name.
+
+ This is used by SearchKey/RelatedKey.py: there is no way to reliably
+ detect if catalog table is used in a related key, so the catalog table
+ might be absent from final table mapping.
+ DO NOT USE IT ANYWHERE ELSE, this will go away...
+
+ This must be changed by designing a new related key API, which must:
+ - state *all* tables they use in their definition
+ - return Query instances instead of raw SQL code
+ This will allow chaining related keys and consequently allow
+ simplifying redundant code.
+ """
assert self.catalog_table_name is not None
- LOG('ColumnMap', WARNING, 'Registering implicit catalog. This use is strongly discouraged.')
self.registerTable(self.catalog_table_name)
self.resolveTable(self.catalog_table_name, self.catalog_table_name)
More information about the Erp5-report
mailing list