From 42a6a1da4555b32c3193b0c659cdc0b912b909eb Mon Sep 17 00:00:00 2001 From: Kristijan Mitrovic Date: Tue, 14 Jul 2020 16:15:38 +0200 Subject: [PATCH] Iterate through etities in order of creation --- .../java/bubble/service/dbfilter/FullEntityIterator.java | 8 +++++--- utils/cobbzilla-wizard | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bubble-server/src/main/java/bubble/service/dbfilter/FullEntityIterator.java b/bubble-server/src/main/java/bubble/service/dbfilter/FullEntityIterator.java index ab9bcdb3..5cd3e3d4 100644 --- a/bubble-server/src/main/java/bubble/service/dbfilter/FullEntityIterator.java +++ b/bubble-server/src/main/java/bubble/service/dbfilter/FullEntityIterator.java @@ -7,6 +7,8 @@ package bubble.service.dbfilter; import bubble.model.cloud.BubbleNetwork; import bubble.server.BubbleConfiguration; import lombok.extern.slf4j.Slf4j; +import org.cobbzilla.wizard.model.Identifiable; +import org.hibernate.criterion.Order; import java.util.concurrent.atomic.AtomicReference; @@ -25,9 +27,9 @@ public class FullEntityIterator extends EntityIterator { } protected void iterate() { - config.getEntityClasses().forEach(c -> { - addEntities(true, c, config.getDaoForEntityClass(c).findAll(), network, null, null); - }); + config.getEntityClasses() + .forEach(c -> addEntities(true, c, config.getDaoForEntityClass(c).findAll(Order.asc(Identifiable.CTIME)), + network, null, null)); log.info("iterate: completed"); } diff --git a/utils/cobbzilla-wizard b/utils/cobbzilla-wizard index 035690f0..32a5cf97 160000 --- a/utils/cobbzilla-wizard +++ b/utils/cobbzilla-wizard @@ -1 +1 @@ -Subproject commit 035690f052f72841bfedc5b25e3798fa22f7b2dd +Subproject commit 32a5cf971f59744fa7ad5350ca778750958ce695