Gregor-Mendel-Institute / GWA-Portal

Web-app to store an display GWAS studies
gwas.gmi.oeaw.ac.at
5 stars 5 forks source link

Deleting old Ionomics Study causes SQL Exception #183

Open timeu opened 7 years ago

timeu commented 7 years ago

14:38:49 SEVERE [uncaught] Uncaught Exception: Exception caught: Server Error: could not execute statement; SQL [n/a]; constraint [div_obs_unit_div_locality_id_fkey]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement

timeu commented 7 years ago

Probably due to https://github.com/timeu/GWA-Portal/blob/master/genophenbrowser-server/src/main/java/com/gmi/nordborglab/browser/server/domain/observation/ObsUnit.java#L42

Change cascade rules: http://stackoverflow.com/questions/13027214/jpa-manytoone-with-cascadetype-all