Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
Bug Crush Event - 21/2/2015
Description
In GenericEntity.set(String name, Object value, boolean setIfNull) after the necessary type conversions and checks it should first be verified that the new value is different from the currently set, before the state is set to changed/modified and observers are notified. E.g. (line 432 ff.):
GenericEntity.java
Object old = fields.get(name); if(!ObjectUtils.equals(old, value)) { fields.put(name, value); generateHashCode = true; modified = true; this.setChanged(); this.notifyObservers(name); }
Also the store in the GenericDelegator should be dependant on the modified-flag of the GenericValue to save.
Update operations could be done more elegantly, and execution time would potentially be saved.