// see if this was caused by an existing record before resetting the sequencer and trying again
// NOTE: use the helper directly so ECA rules, etc won't be run
GenericValue existingValue = null;
try {
existingValue = helper.findByPrimaryKey(value.getPrimaryKey());
} catch (GenericEntityException e1) {
// ignore this error, if not found it'll probably be a GenericEntityNotFoundException
// it is important to not let this get thrown because it will mask the original exception
}
if (existingValue == null) {