Skip to content

Commit

Permalink
Temporarily rename the change-event-result organization relationship (#…
Browse files Browse the repository at this point in the history
…94)

This relationship uses the same `org:organization` predicate that is also used for the local involvements relationship. When querying for local involvements data when an organization also has change events data,  mu-cl-resources receives the change events data instead and runs into errors. This is likely a bug in the micro service itself. Renaming the predicate is a quick workaround so we have more time to find the real solution for the problem without a broken app.
  • Loading branch information
Windvis authored Jan 25, 2022
1 parent b5a7eb1 commit 422e92a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
PREFIX ext: <http://mu.semte.ch/vocabularies/ext/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX org: <http://www.w3.org/ns/org#>

DELETE {
GRAPH ?g {
?changeEventResult org:organization ?organization .
}
} INSERT {
GRAPH ?g {
?changeEventResult ext:resultingOrganization ?organization .
}
} WHERE {
GRAPH ?g {
?changeEventResult a <http://lblod.data.gift/vocabularies/organisatie/VeranderingsgebeurtenisResultaat> ;
org:organization ?organization .
}
}
2 changes: 1 addition & 1 deletion config/resources/change-events.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"attributes": {},
"relationships": {
"resulting-organization": {
"predicate": "org:organization",
"predicate": "ext:resultingOrganization",
"target": "organizations",
"cardinality": "one"
},
Expand Down
2 changes: 1 addition & 1 deletion config/resources/domain.json
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@
"inverse": true
},
"change-event-results": {
"predicate": "org:organization",
"predicate": "ext:resultingOrganization",
"target": "change-event-results",
"cardinality": "many",
"inverse": true
Expand Down

0 comments on commit 422e92a

Please sign in to comment.