[Bug #1008] it catchs HibernateOptimisticLockingFailureException in validator
method of the workReportType entity. It is caught in the validator. Otherwise it would be wraped by hibernate and would bypass the automatic handling of OptimisttcLockingFailureExceptions FEA: ItEr74S04BugFixing
This commit is contained in:
parent
c5de10fa0e
commit
bb04626999
1 changed files with 3 additions and 0 deletions
|
|
@ -36,6 +36,7 @@ import org.navalplanner.business.common.exceptions.InstanceNotFoundException;
|
|||
import org.navalplanner.business.labels.entities.LabelType;
|
||||
import org.navalplanner.business.workreports.daos.IWorkReportTypeDAO;
|
||||
import org.navalplanner.business.workreports.valueobjects.DescriptionField;
|
||||
import org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException;
|
||||
/**
|
||||
* @author Diego Pino García <dpino@igalia.com>
|
||||
* @author Susana Montes Pedreira <smontes@wirelessgalicia.com>
|
||||
|
|
@ -174,6 +175,8 @@ public class WorkReportType extends IntegrationEntity {
|
|||
return true;
|
||||
} catch (NonUniqueResultException e) {
|
||||
return false;
|
||||
} catch (HibernateOptimisticLockingFailureException e) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue