notification.setDateUpdate(new Date());
if (notification.getId() != null) {
if(em.contains(notification)){
em.refresh(notification);
}
Notification mergedNotification = em.merge(notification);
em.flush();
return mergedNotification;
} else {
em.persist(notification);
return notification;