mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 14:17:57 +01:00
Show more rows on history.
This commit is contained in:
parent
cc8ff94b10
commit
9360a27f15
@ -57,11 +57,9 @@ public class MindmapManagerImpl
|
|||||||
final Criteria hibernateCriteria = getSession().createCriteria(MindMapHistory.class);
|
final Criteria hibernateCriteria = getSession().createCriteria(MindMapHistory.class);
|
||||||
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
|
|
||||||
// This line throws errors in some environments, so getting all history and taking firsts 10 records
|
// This line throws errors in some environments, so getting all history and taking firsts 10 records
|
||||||
// hibernateCriteria.setMaxResults(10);
|
hibernateCriteria.setMaxResults(30);
|
||||||
List list = hibernateCriteria.list();
|
return hibernateCriteria.list();
|
||||||
return list.subList(0, (10 < list.size() ? 10 : list.size()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user