I have a grails project that is throwing the following exception:
org.springframework.dao.DataIntegrityViolationException: could not delete: [Role#4]; SQL [delete from role where id=? an
d version=?]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not del
ete: [Role#4]
In my Role domain, all I did to create this error, was change the definition of one of the variables from
List<RoleTool> roleTools = new ArrayList<RoleTool>()
to
ArrayList<RoleTool> roleTools = new ArrayList<RoleTool>()
Why is that?