From 7b9a86384107ac127b0007fd767131633f8ce786 Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Fri, 6 Feb 2009 21:51:27 +0000 Subject: Fix index updates when derived index against joined storable is deleted. --- src/main/java/com/amazon/carbonado/gen/StorableGenerator.java | 3 +++ .../com/amazon/carbonado/repo/indexed/DerivedIndexesTrigger.java | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java b/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java index 5e1d1fc..87dede1 100644 --- a/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java +++ b/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java @@ -826,6 +826,9 @@ public final class StorableGenerator { int count = property.getJoinElementCount(); for (int i=0; i extends Trig @Override public void afterDelete(S storable, Object state) throws PersistException { - updateValues(storable, state); + if (state != null) { + List oldIndexEntries = (List) state; + int size = oldIndexEntries.size(); + for (int i=0; i