From: Marko Luukkainen Date: Mon, 27 Nov 2017 09:03:22 +0000 (+0200) Subject: ListUtils.create(WriteGraph, Iterable elements) X-Git-Tag: v1.31.0~18^2 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=f016d40e5f6a2dca277a317188d1bb73b8255118;p=simantics%2Fplatform.git ListUtils.create(WriteGraph, Iterable elements) DelayedWritegraph fix fixes #7645 Change-Id: I699de77f346528234c7007639b01bcdbd72d4de4 --- diff --git a/bundles/org.simantics.db.common/src/org/simantics/db/common/utils/ListUtils.java b/bundles/org.simantics.db.common/src/org/simantics/db/common/utils/ListUtils.java index 3631de4b3..a197de880 100644 --- a/bundles/org.simantics.db.common/src/org/simantics/db/common/utils/ListUtils.java +++ b/bundles/org.simantics.db.common/src/org/simantics/db/common/utils/ListUtils.java @@ -54,13 +54,8 @@ public class ListUtils { * Creates a list containing the given {@code elements}. */ public static Resource create(WriteGraph g, Iterable elements) throws DatabaseException { - Layer0 L0 = Layer0.getInstance(g); - - Resource list = g.newResource(); - g.claim(list, L0.InstanceOf, L0.List); - - insertBetween(g, L0, list, list, list, elements); - return list; + Layer0 L0 = Layer0.getInstance(g); + return ListUtils.create(g,L0.List, L0.List_ElementWithInverse, L0.List_ElementWithInverse_Inverse, elements); } /**