]> gerrit.simantics Code Review - simantics/interop.git/commitdiff
Graph comparison and change management fixes. 57/4957/1 release/1.43.1
authorMarko Luukkainen <marko.luukkainen@semantum.fi>
Fri, 25 Aug 2023 12:40:03 +0000 (15:40 +0300)
committerMarko Luukkainen <marko.luukkainen@semantum.fi>
Fri, 25 Aug 2023 12:40:03 +0000 (15:40 +0300)
GraphChanges did not take account that property relations may not be
included in the bijection.

Change-Id: If770c692c35f5104c34c947bbbc4953378d152e1

org.simantics.interop/src/org/simantics/interop/test/GraphChanges.java

index f9065070fe095f8e3c247c12bf03011f8db811cd..304c156f3ec166a85440569087aa0e5c74221fdb 100644 (file)
@@ -271,6 +271,8 @@ public class GraphChanges {
                                                p2 = p1;
                                        Resource o1 = del.getObject();
                                        Resource o2 = bijection.getComparable().getRight(o1);
+                                       if (o2 == null)
+                                               o2 = graph.getPossibleObject(s2, p2);
                                        
                                        if (s2 == null || p2 == null || o2 == null) {
                                                throw new DatabaseException("Did not find matching statement from bijection for (" + s1 +","+p1+","+o1+"), got (" + s2 +","+p2+","+o2+")");