diff --git a/src/main/kotlin/org/openmbee/flexo/mms/routes/Model.kt b/src/main/kotlin/org/openmbee/flexo/mms/routes/Model.kt index f6c97956..40b6c0b6 100644 --- a/src/main/kotlin/org/openmbee/flexo/mms/routes/Model.kt +++ b/src/main/kotlin/org/openmbee/flexo/mms/routes/Model.kt @@ -285,10 +285,13 @@ fun AnyLayer1Context.genDiffUpdate(diffTriples: String="", conditions: Condition } # ... that isn't in the destination graph - filter not exists { - graph ?dstGraph { - ?del_s ?del_p ?del_o . - } + MINUS { + {select * where { + hint:SubQuery hint:evaluationStrategy "BottomUp" . + graph ?dstGraph { + ?del_s ?del_p ?del_o . + } + }} } } union { # insert every triple from the destination graph... @@ -296,11 +299,14 @@ fun AnyLayer1Context.genDiffUpdate(diffTriples: String="", conditions: Condition ?ins_s ?ins_p ?ins_o . } - # ... that isn't in the source graph - filter not exists { - graph ?srcGraph { - ?ins_s ?ins_p ?ins_o . - } + # ... that isn't in the source graph + MINUS { + {select * where { + hint:SubQuery hint:evaluationStrategy "BottomUp" . + graph ?srcGraph { + ?ins_s ?ins_p ?ins_o . + } + }} } } union {} """) diff --git a/src/main/kotlin/org/openmbee/flexo/mms/routes/gsp/ModelLoad.kt b/src/main/kotlin/org/openmbee/flexo/mms/routes/gsp/ModelLoad.kt index 53b80d4b..d8985db7 100644 --- a/src/main/kotlin/org/openmbee/flexo/mms/routes/gsp/ModelLoad.kt +++ b/src/main/kotlin/org/openmbee/flexo/mms/routes/gsp/ModelLoad.kt @@ -56,8 +56,9 @@ suspend fun GspLayer1Context.loadModel() { // compute the delta val updateString = genDiffUpdate() + val prefixesnew = prefixes.add("hint" to "http://aws.amazon.com/neptune/vocab/v01/QueryHints#") executeSparqlUpdate(updateString) { - prefixes(prefixes) + prefixes(prefixesnew) iri( // use current branch as ref source