[Erp5-report] r19697 - in /erp5/trunk/products/ERP5/bootstrap/erp5_mysql_innodb_catalog: Ca...
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Mar 5 13:16:51 CET 2008
Author: seb
Date: Wed Mar 5 13:16:49 2008
New Revision: 19697
URL: http://svn.erp5.org?rev=19697&view=rev
Log:
- revert the last change made by Vincent on z_catalog_predicate_category_list, and
then insert 0 values instead of null values. Nothing was inserted into the
predicate_category table by the last patch when no membership criterion category
list was definied on a predicate, so there was errors in testDomainTool.
Modified:
erp5/trunk/products/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_predicate_category_list.xml
erp5/trunk/products/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/revision
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_predicate_category_list.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_predicate_category_list.xml?rev=19697&r1=19696&r2=19697&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_predicate_category_list.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_predicate_category_list.xml Wed Mar 5 13:16:49 2008
@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
- <tuple>
- <string>Products.ZSQLMethods.SQL</string>
- <string>SQL</string>
- </tuple>
- <none/>
+ <global name="SQL" module="Products.ZSQLMethods.SQL"/>
+ <tuple/>
</tuple>
</pickle>
<pickle>
@@ -57,9 +54,9 @@
<key> <string>_keys</string> </key>
<value>
<list>
- <string>uid</string>
- <string>predicate_property_dict</string>
- <string>isPredicate</string>
+<string>uid</string>
+<string>predicate_property_dict</string>
+<string>isPredicate</string>
</list>
</value>
</item>
@@ -125,22 +122,37 @@
uid=<dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if>\n
</dtml-in>\n
;\n
+\n
<dtml-var "\'\\0\'">\n
-<dtml-let category_list="[]">\n
-<dtml-in prefix="loop" expr="_.range(_.len(uid))">\n
-<dtml-if expr="isPredicate[loop_item] and predicate_property_dict[loop_item].has_key(\'membership_criterion_category_list\')">\n
-<dtml-let uid_list="portal_categories.getCategoryParentUidList(predicate_property_dict[loop_item][\'membership_criterion_category_list\'])">\n
-<dtml-if uid_list>\n
-<dtml-in prefix="uid" expr="uid_list">\n
-<dtml-call expr="category_list.append((uid[loop_item], uid_item[0], uid_item[1], uid_item[2]))">\n
-</dtml-in></dtml-if></dtml-let></dtml-if></dtml-in>\n
-<dtml-if expr="category_list">\n
+\n
+<dtml-let predicate_list="[]">\n
+ <dtml-in prefix="loop" expr="_.range(_.len(uid))">\n
+ <dtml-if "isPredicate[loop_item]">\n
+ <dtml-call expr="predicate_list.append(loop_item)">\n
+ </dtml-if>\n
+ </dtml-in>\n
+ <dtml-if expr="_.len(predicate_list) > 0">\n
INSERT INTO predicate_category VALUES \n
-<dtml-in prefix="loop" expr="category_list">\n
-<dtml-if sequence-start><dtml-else>,</dtml-if>(<dtml-sqlvar expr="loop_item[0]" type="int">, <dtml-sqlvar expr="loop_item[1]" type="int">, <dtml-sqlvar expr="loop_item[2]" type="int">, <dtml-sqlvar expr="loop_item[3]" type="int">)\n
-</dtml-in>\n
-</dtml-if>\n
-</dtml-let>
+ <dtml-in prefix="loop" expr="predicate_list">\n
+ <dtml-if sequence-start><dtml-else>,</dtml-if>\n
+ <dtml-if "predicate_property_dict[loop_item].has_key(\'membership_criterion_category_list\')">\n
+ <dtml-let uid_list="portal_categories.getCategoryParentUidList(predicate_property_dict[loop_item][\'membership_criterion_category_list\'])">\n
+ <dtml-if uid_list>\n
+ <dtml-in "uid_list">\n
+(<dtml-sqlvar expr="uid[loop_item]" type="int">, <dtml-var "_[\'sequence-item\'][0]" >, <dtml-var "_[\'sequence-item\'][1]" >, <dtml-var "_[\'sequence-item\'][2]" >)\n
+ <dtml-if sequence-end><dtml-else>,</dtml-if>\n
+ </dtml-in> \n
+ <dtml-else>\n
+(<dtml-sqlvar expr="uid[loop_item]" type="int">, 0, 0,1)\n
+ </dtml-if>\n
+ </dtml-let>\n
+ <dtml-else>\n
+(<dtml-sqlvar expr="uid[loop_item]" type="int">, 0, 0,1)\n
+ </dtml-if>\n
+ </dtml-in>\n
+ </dtml-if>\n
+</dtml-let>\n
+
]]></string> </value>
</item>
@@ -149,9 +161,11 @@
<value>
<object>
<klass>
+ <global name="__newobj__" module="copy_reg"/>
+ </klass>
+ <tuple>
<global name="SQL" module="Shared.DC.ZRDB.DA"/>
- </klass>
- <none/>
+ </tuple>
<state>
<dictionary>
<item>
@@ -185,22 +199,37 @@
uid=<dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if>\n
</dtml-in>\n
;\n
+\n
<dtml-var "\'\\0\'">\n
-<dtml-let category_list="[]">\n
-<dtml-in prefix="loop" expr="_.range(_.len(uid))">\n
-<dtml-if expr="isPredicate[loop_item] and predicate_property_dict[loop_item].has_key(\'membership_criterion_category_list\')">\n
-<dtml-let uid_list="portal_categories.getCategoryParentUidList(predicate_property_dict[loop_item][\'membership_criterion_category_list\'])">\n
-<dtml-if uid_list>\n
-<dtml-in prefix="uid" expr="uid_list">\n
-<dtml-call expr="category_list.append((uid[loop_item], uid_item[0], uid_item[1], uid_item[2]))">\n
-</dtml-in></dtml-if></dtml-let></dtml-if></dtml-in>\n
-<dtml-if expr="category_list">\n
+\n
+<dtml-let predicate_list="[]">\n
+ <dtml-in prefix="loop" expr="_.range(_.len(uid))">\n
+ <dtml-if "isPredicate[loop_item]">\n
+ <dtml-call expr="predicate_list.append(loop_item)">\n
+ </dtml-if>\n
+ </dtml-in>\n
+ <dtml-if expr="_.len(predicate_list) > 0">\n
INSERT INTO predicate_category VALUES \n
-<dtml-in prefix="loop" expr="category_list">\n
-<dtml-if sequence-start><dtml-else>,</dtml-if>(<dtml-sqlvar expr="loop_item[0]" type="int">, <dtml-sqlvar expr="loop_item[1]" type="int">, <dtml-sqlvar expr="loop_item[2]" type="int">, <dtml-sqlvar expr="loop_item[3]" type="int">)\n
-</dtml-in>\n
-</dtml-if>\n
-</dtml-let>
+ <dtml-in prefix="loop" expr="predicate_list">\n
+ <dtml-if sequence-start><dtml-else>,</dtml-if>\n
+ <dtml-if "predicate_property_dict[loop_item].has_key(\'membership_criterion_category_list\')">\n
+ <dtml-let uid_list="portal_categories.getCategoryParentUidList(predicate_property_dict[loop_item][\'membership_criterion_category_list\'])">\n
+ <dtml-if uid_list>\n
+ <dtml-in "uid_list">\n
+(<dtml-sqlvar expr="uid[loop_item]" type="int">, <dtml-var "_[\'sequence-item\'][0]" >, <dtml-var "_[\'sequence-item\'][1]" >, <dtml-var "_[\'sequence-item\'][2]" >)\n
+ <dtml-if sequence-end><dtml-else>,</dtml-if>\n
+ </dtml-in> \n
+ <dtml-else>\n
+(<dtml-sqlvar expr="uid[loop_item]" type="int">, 0, 0,1)\n
+ </dtml-if>\n
+ </dtml-let>\n
+ <dtml-else>\n
+(<dtml-sqlvar expr="uid[loop_item]" type="int">, 0, 0,1)\n
+ </dtml-if>\n
+ </dtml-in>\n
+ </dtml-if>\n
+</dtml-let>\n
+
]]></string> </value>
</item>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/revision?rev=19697&r1=19696&r2=19697&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/revision (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/revision Wed Mar 5 13:16:49 2008
@@ -1,1 +1,1 @@
-95
+99
More information about the Erp5-report
mailing list