diff --git a/vcs/src/main/java/one/nem/lacerta/vcs/impl/LacertaVcsImpl.java b/vcs/src/main/java/one/nem/lacerta/vcs/impl/LacertaVcsImpl.java index 2881724c..c865ede3 100644 --- a/vcs/src/main/java/one/nem/lacerta/vcs/impl/LacertaVcsImpl.java +++ b/vcs/src/main/java/one/nem/lacerta/vcs/impl/LacertaVcsImpl.java @@ -197,10 +197,8 @@ public class LacertaVcsImpl implements LacertaVcs { private ArrayList getLogInRevs(ArrayList vcsRevEntities){ ArrayList vcsLogEntities = new ArrayList<>(); vcsRevEntities.forEach(vcsRevEntity -> { - vcsRevEntity.logIds.forEach(logId -> { - VcsLogEntity vcsLogEntity = database.vcsLogDao().findById(logId); - vcsLogEntities.add(vcsLogEntity); - }); + List logIds = new ArrayList<>(vcsRevEntity.logIds); + vcsLogEntities.addAll(database.vcsLogDao().findByIds(logIds)); }); return vcsLogEntities;