Commit ce3c6f76 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Revert the previous change, because rows are not unique.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4257 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6c4eee2d
......@@ -15,6 +15,16 @@ getDestinationSectionUid
getResourceUid
getVariationText
getAggregateUidList</params>
DELETE FROM
item
WHERE
<dtml-in uid>
uid=<dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if>
</dtml-in>
;
<dtml-var "'\0'">
<dtml-let movement_list="[]">
<dtml-in prefix="loop" expr="_.range(_.len(uid))">
<dtml-if "isMovement[loop_item] and getAggregateUidList[loop_item]">
......@@ -22,7 +32,7 @@ getAggregateUidList</params>
</dtml-if>
</dtml-in>
<dtml-if expr="_.len(movement_list) > 0">
REPLACE INTO
INSERT INTO
item
VALUES
<dtml-in prefix="loop" expr="movement_list">
......
......@@ -10,7 +10,17 @@ class_file:
<params>uid
isMovement
getCategoryList</params>
REPLACE INTO category VALUES
DELETE FROM
category
WHERE
<dtml-in uid>
uid=<dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if>
</dtml-in>
;
<dtml-var "'\0'">
INSERT INTO category VALUES
<dtml-in prefix="loop" expr="_.range(_.len(uid))">
<dtml-if sequence-start><dtml-else>,</dtml-if>
<dtml-if expr="getCategoryList[loop_item]">
......
......@@ -9,7 +9,17 @@ class_file:
</dtml-comment>
<params>uid
getAcquiredCategoryList</params>
REPLACE INTO category VALUES
DELETE FROM
category
WHERE
<dtml-in uid>
uid=<dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if>
</dtml-in>
;
<dtml-var "'\0'">
INSERT INTO category VALUES
<dtml-in prefix="loop" expr="_.range(_.len(uid))">
<dtml-if sequence-start><dtml-else>,</dtml-if>
<dtml-if expr="getAcquiredCategoryList[loop_item]">
......
......@@ -10,6 +10,16 @@ class_file:
<params>uid
predicate_property_dict
isPredicate</params>
DELETE FROM
predicate_category
WHERE
<dtml-in uid>
uid=<dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if>
</dtml-in>
;
<dtml-var "'\0'">
<dtml-let predicate_list="[]">
<dtml-in prefix="loop" expr="_.range(_.len(uid))">
<dtml-if "isPredicate[loop_item]">
......@@ -17,7 +27,7 @@ isPredicate</params>
</dtml-if>
</dtml-in>
<dtml-if expr="_.len(predicate_list) > 0">
REPLACE INTO predicate_category VALUES
INSERT INTO predicate_category VALUES
<dtml-in prefix="loop" expr="predicate_list">
<dtml-if sequence-start><dtml-else>,</dtml-if>
<dtml-if "predicate_property_dict[loop_item].has_key('membership_criterion_category_list')">
......
......@@ -28,6 +28,16 @@ getStopDate
isAccountable
getPortalType
getVariationText</params>
DELETE FROM
stock
WHERE
<dtml-in uid>
uid=<dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if>
</dtml-in>
;
<dtml-var "'\0'">
<dtml-let row_list="[]">
<dtml-in prefix="loop" expr="_.range(_.len(uid))">
<dtml-if "isMovement[loop_item]">
......@@ -45,7 +55,7 @@ getVariationText</params>
</dtml-in>
<dtml-if "row_list">
REPLACE INTO
INSERT INTO
stock
VALUES
<dtml-in prefix="row" expr="row_list">
......
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