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 ...@@ -15,6 +15,16 @@ getDestinationSectionUid
getResourceUid getResourceUid
getVariationText getVariationText
getAggregateUidList</params> 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-let movement_list="[]">
<dtml-in prefix="loop" expr="_.range(_.len(uid))"> <dtml-in prefix="loop" expr="_.range(_.len(uid))">
<dtml-if "isMovement[loop_item] and getAggregateUidList[loop_item]"> <dtml-if "isMovement[loop_item] and getAggregateUidList[loop_item]">
...@@ -22,7 +32,7 @@ getAggregateUidList</params> ...@@ -22,7 +32,7 @@ getAggregateUidList</params>
</dtml-if> </dtml-if>
</dtml-in> </dtml-in>
<dtml-if expr="_.len(movement_list) > 0"> <dtml-if expr="_.len(movement_list) > 0">
REPLACE INTO INSERT INTO
item item
VALUES VALUES
<dtml-in prefix="loop" expr="movement_list"> <dtml-in prefix="loop" expr="movement_list">
......
...@@ -10,7 +10,17 @@ class_file: ...@@ -10,7 +10,17 @@ class_file:
<params>uid <params>uid
isMovement isMovement
getCategoryList</params> 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-in prefix="loop" expr="_.range(_.len(uid))">
<dtml-if sequence-start><dtml-else>,</dtml-if> <dtml-if sequence-start><dtml-else>,</dtml-if>
<dtml-if expr="getCategoryList[loop_item]"> <dtml-if expr="getCategoryList[loop_item]">
......
...@@ -9,7 +9,17 @@ class_file: ...@@ -9,7 +9,17 @@ class_file:
</dtml-comment> </dtml-comment>
<params>uid <params>uid
getAcquiredCategoryList</params> 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-in prefix="loop" expr="_.range(_.len(uid))">
<dtml-if sequence-start><dtml-else>,</dtml-if> <dtml-if sequence-start><dtml-else>,</dtml-if>
<dtml-if expr="getAcquiredCategoryList[loop_item]"> <dtml-if expr="getAcquiredCategoryList[loop_item]">
......
...@@ -10,6 +10,16 @@ class_file: ...@@ -10,6 +10,16 @@ class_file:
<params>uid <params>uid
predicate_property_dict predicate_property_dict
isPredicate</params> 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-let predicate_list="[]">
<dtml-in prefix="loop" expr="_.range(_.len(uid))"> <dtml-in prefix="loop" expr="_.range(_.len(uid))">
<dtml-if "isPredicate[loop_item]"> <dtml-if "isPredicate[loop_item]">
...@@ -17,7 +27,7 @@ isPredicate</params> ...@@ -17,7 +27,7 @@ isPredicate</params>
</dtml-if> </dtml-if>
</dtml-in> </dtml-in>
<dtml-if expr="_.len(predicate_list) > 0"> <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-in prefix="loop" expr="predicate_list">
<dtml-if sequence-start><dtml-else>,</dtml-if> <dtml-if sequence-start><dtml-else>,</dtml-if>
<dtml-if "predicate_property_dict[loop_item].has_key('membership_criterion_category_list')"> <dtml-if "predicate_property_dict[loop_item].has_key('membership_criterion_category_list')">
......
...@@ -28,6 +28,16 @@ getStopDate ...@@ -28,6 +28,16 @@ getStopDate
isAccountable isAccountable
getPortalType getPortalType
getVariationText</params> 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-let row_list="[]">
<dtml-in prefix="loop" expr="_.range(_.len(uid))"> <dtml-in prefix="loop" expr="_.range(_.len(uid))">
<dtml-if "isMovement[loop_item]"> <dtml-if "isMovement[loop_item]">
...@@ -45,7 +55,7 @@ getVariationText</params> ...@@ -45,7 +55,7 @@ getVariationText</params>
</dtml-in> </dtml-in>
<dtml-if "row_list"> <dtml-if "row_list">
REPLACE INTO INSERT INTO
stock stock
VALUES VALUES
<dtml-in prefix="row" expr="row_list"> <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