diff --git a/persist/src/main/java/lcsb/mapviewer/persist/dao/BaseDao.java b/persist/src/main/java/lcsb/mapviewer/persist/dao/BaseDao.java index 5cb391fb1974970566703b1586ba4ca568ecd532..efb3df7af91bfa2b7e796cf7f48152c1ef95a2ba 100644 --- a/persist/src/main/java/lcsb/mapviewer/persist/dao/BaseDao.java +++ b/persist/src/main/java/lcsb/mapviewer/persist/dao/BaseDao.java @@ -254,7 +254,10 @@ public abstract class BaseDao<T> { * @return object width identifier given as parameter */ @SuppressWarnings("unchecked") - public T getById(int id) { + public T getById(Integer id) { + if (id == null) { + return null; + } List<?> list = getSession() .createQuery(" from " + this.clazz.getSimpleName() + " where id=:id " + removableAndStatemant()) .setParameter("id", id).list();