From 26c8961eea84f61aa0fc9aa78fd4ec4c02bc91ee Mon Sep 17 00:00:00 2001
From: Vincent Pelletier <vincent@nexedi.com>
Date: Tue, 21 Apr 2009 08:15:46 +0000
Subject: [PATCH] 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.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26536 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ZSQLCatalog/ColumnMap.py | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/product/ZSQLCatalog/ColumnMap.py b/product/ZSQLCatalog/ColumnMap.py
index c164f9f053..77f3dbef4c 100644
--- a/product/ZSQLCatalog/ColumnMap.py
+++ b/product/ZSQLCatalog/ColumnMap.py
@@ -151,8 +151,22 @@ class ColumnMap(object):
 
   @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)
 
-- 
2.30.9