mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 14:17:57 +01:00
reapplying history fix
This commit is contained in:
parent
92d39f0a08
commit
760ccd3754
@ -55,8 +55,10 @@ public class MindmapManagerImpl
|
|||||||
hibernateCriteria.add(Restrictions.eq("mindmapId",mindmapId));
|
hibernateCriteria.add(Restrictions.eq("mindmapId",mindmapId));
|
||||||
hibernateCriteria.addOrder( Order.desc("creationTime"));
|
hibernateCriteria.addOrder( Order.desc("creationTime"));
|
||||||
// Mientras no haya paginacion solo los 10 primeros
|
// Mientras no haya paginacion solo los 10 primeros
|
||||||
hibernateCriteria.setMaxResults(10);
|
// This line throws errors in some environments, so getting all history and taking firsts 10 records
|
||||||
return hibernateCriteria.list();
|
// hibernateCriteria.setMaxResults(10);
|
||||||
|
List list = hibernateCriteria.list();
|
||||||
|
return list.subList(0,(10<list.size()?10:list.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public MindMapHistory getHistory(int historyId)
|
public MindMapHistory getHistory(int historyId)
|
||||||
|
Loading…
Reference in New Issue
Block a user