Commit 97772bff authored by Nicolas Dumazet's avatar Nicolas Dumazet

Of course, JOIN on delivery should be a LEFT JOIN.

Thanks to tatuya for noticing!

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37121 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2a51b7dd
...@@ -86,7 +86,11 @@ SELECT\n ...@@ -86,7 +86,11 @@ SELECT\n
FROM\n FROM\n
movement\n movement\n
, catalog\n , catalog\n
, category as delivery\n , LEFT JOIN category as delivery\n
ON (\n
catalog.uid = delivery.uid\n
AND <dtml-sqltest "portal_categories.delivery.getUid()" column="delivery.base_category_uid" type="int">\n
)\n
, category as causality\n , category as causality\n
<dtml-in prefix="table" expr="from_table_list">\n <dtml-in prefix="table" expr="from_table_list">\n
<dtml-if expr="table_key not in (\'catalog\', \'movement\')">\n <dtml-if expr="table_key not in (\'catalog\', \'movement\')">\n
...@@ -95,9 +99,7 @@ FROM\n ...@@ -95,9 +99,7 @@ FROM\n
</dtml-in>\n </dtml-in>\n
\n \n
WHERE\n WHERE\n
catalog.uid = delivery.uid\n delivery.category_uid is NULL\n
AND <dtml-sqltest "portal_categories.delivery.getUid()" column="delivery.base_category_uid" type="int">\n
AND delivery.category_uid is NULL\n
\n \n
AND catalog.uid = causality.uid\n AND catalog.uid = causality.uid\n
AND <dtml-sqltest "portal_categories.causality.getUid()" column="causality.base_category_uid" type="int">\n AND <dtml-sqltest "portal_categories.causality.getUid()" column="causality.base_category_uid" type="int">\n
...@@ -106,8 +108,7 @@ WHERE\n ...@@ -106,8 +108,7 @@ WHERE\n
AND catalog.uid = movement.uid\n AND catalog.uid = movement.uid\n
AND movement.resource_uid is not NULL\n AND movement.resource_uid is not NULL\n
\n \n
<dtml-if where_expression>AND <dtml-var where_expression></dtml-if>\n <dtml-if where_expression>AND <dtml-var where_expression></dtml-if>
]]></string> </value> ]]></string> </value>
</item> </item>
...@@ -156,7 +157,11 @@ SELECT\n ...@@ -156,7 +157,11 @@ SELECT\n
FROM\n FROM\n
movement\n movement\n
, catalog\n , catalog\n
, category as delivery\n , LEFT JOIN category as delivery\n
ON (\n
catalog.uid = delivery.uid\n
AND <dtml-sqltest "portal_categories.delivery.getUid()" column="delivery.base_category_uid" type="int">\n
)\n
, category as causality\n , category as causality\n
<dtml-in prefix="table" expr="from_table_list">\n <dtml-in prefix="table" expr="from_table_list">\n
<dtml-if expr="table_key not in (\'catalog\', \'movement\')">\n <dtml-if expr="table_key not in (\'catalog\', \'movement\')">\n
...@@ -165,9 +170,7 @@ FROM\n ...@@ -165,9 +170,7 @@ FROM\n
</dtml-in>\n </dtml-in>\n
\n \n
WHERE\n WHERE\n
catalog.uid = delivery.uid\n delivery.category_uid is NULL\n
AND <dtml-sqltest "portal_categories.delivery.getUid()" column="delivery.base_category_uid" type="int">\n
AND delivery.category_uid is NULL\n
\n \n
AND catalog.uid = causality.uid\n AND catalog.uid = causality.uid\n
AND <dtml-sqltest "portal_categories.causality.getUid()" column="causality.base_category_uid" type="int">\n AND <dtml-sqltest "portal_categories.causality.getUid()" column="causality.base_category_uid" type="int">\n
...@@ -176,8 +179,7 @@ WHERE\n ...@@ -176,8 +179,7 @@ WHERE\n
AND catalog.uid = movement.uid\n AND catalog.uid = movement.uid\n
AND movement.resource_uid is not NULL\n AND movement.resource_uid is not NULL\n
\n \n
<dtml-if where_expression>AND <dtml-var where_expression></dtml-if>\n <dtml-if where_expression>AND <dtml-var where_expression></dtml-if>
]]></string> </value> ]]></string> </value>
</item> </item>
......
806 807
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment