mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 06:07:57 +01:00
Fix delete issue removing in hsql. History is now removed in advance.
This commit is contained in:
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
Block a user