Skip to content

Commit

Permalink
0002464: If individual column templates are changed in a trigger
Browse files Browse the repository at this point in the history
template are changed from release to release, triggers are not rebuilt
  • Loading branch information
chenson42 committed Dec 9, 2015
1 parent 8e53aad commit 923c776
Showing 1 changed file with 15 additions and 0 deletions.
Expand Up @@ -23,6 +23,7 @@
import static org.apache.commons.lang.StringUtils.isBlank;
import static org.apache.commons.lang.StringUtils.isNotBlank;

import java.lang.reflect.Field;
import java.sql.Types;
import java.util.Map;

Expand Down Expand Up @@ -1056,6 +1057,20 @@ public int toHashedValue() {
for (String key : sqlTemplates.keySet()) {
hashedValue += sqlTemplates.get(key).hashCode();
}

Field[] fields = getClass().getSuperclass().getDeclaredFields();
for (Field field : fields) {
if (field.getType().equals(String.class)) {
try {
String value = (String)field.get(this);
if (value != null) {
hashedValue += value.hashCode();
}
} catch (Exception e) {
log.warn("Failed to get hash code for field " + field.getName());
}
}
}
}
return hashedValue;
}
Expand Down

0 comments on commit 923c776

Please sign in to comment.