Fix delete issue removing in hsql. History is now removed in advance.
parent
8b0465bda6
commit
37419cba66
|
@ -203,6 +203,13 @@ public class MindmapManagerImpl
|
|||
|
||||
@Override
|
||||
public void removeMindmap(@NotNull final Mindmap mindMap) {
|
||||
// Delete history first ...
|
||||
final Criteria hibernateCriteria = getSession().createCriteria(MindMapHistory.class);
|
||||
hibernateCriteria.add(Restrictions.eq("mindmapId", mindMap.getId()));
|
||||
List list = hibernateCriteria.list();
|
||||
getHibernateTemplate().deleteAll(list);
|
||||
|
||||
// Delete mindmap ....
|
||||
getHibernateTemplate().delete(mindMap);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue