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. --- .../com/amazon/carbonado/repo/indexed/DerivedIndexesTrigger.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/main/java/com/amazon/carbonado/repo') diff --git a/src/main/java/com/amazon/carbonado/repo/indexed/DerivedIndexesTrigger.java b/src/main/java/com/amazon/carbonado/repo/indexed/DerivedIndexesTrigger.java index 2cc3d8f..9176e92 100644 --- a/src/main/java/com/amazon/carbonado/repo/indexed/DerivedIndexesTrigger.java +++ b/src/main/java/com/amazon/carbonado/repo/indexed/DerivedIndexesTrigger.java @@ -88,7 +88,13 @@ class DerivedIndexesTrigger 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