From ebba3e7db87a1aa2ada49e7204b7c6c645523c8f Mon Sep 17 00:00:00 2001 From: anttil <anttil> Date: Fri, 15 Feb 2013 08:40:10 +0000 Subject: [PATCH] BIS-331 / SP-519 : Experiment batch registration does not work SVN: 28379 --- .../openbis/generic/server/dataaccess/db/ExperimentDAO.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ExperimentDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ExperimentDAO.java index bfc561e7499..e2e13bd3da3 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ExperimentDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ExperimentDAO.java @@ -19,6 +19,7 @@ package ch.systemsx.cisd.openbis.generic.server.dataaccess.db; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; +import java.util.Date; import java.util.List; import java.util.Set; @@ -423,6 +424,10 @@ public class ExperimentDAO extends AbstractGenericEntityWithPropertiesDAO<Experi { assert experiment != null : "Missing experiment."; experiment.setCode(CodeConverter.tryToDatabase(experiment.getCode())); + if (experiment.getModificationDate() == null) + { + experiment.setModificationDate(new Date()); + } validatePE(experiment); final HibernateTemplate template = getHibernateTemplate(); template.saveOrUpdate(experiment); -- GitLab