Skip to content

Commit

Permalink
Merge pull request #782 from lblod/workaround/virtuoso-duplication-bug
Browse files Browse the repository at this point in the history
fix duplicated SPARQL results
  • Loading branch information
abeforgit authored Dec 2, 2024
2 parents d260764 + 28f57ed commit 82d1528
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/ninety-tomatoes-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'frontend-gelinkt-notuleren': patch
---

Work around virtuoso optional-nested-select duplication bug by replacing `OPTIONAL` statements by `UNION` statements
18 changes: 16 additions & 2 deletions app/config/mandatee-table-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -1332,9 +1332,16 @@ export const mandateeTableConfigRMW = (meeting) => {
?mandataris a mandaat:Mandataris.
?mandataris mandaat:isBestuurlijkeAliasVan ?persoon.
?mandataris org:hasMembership/org:organisation ?fractie.
OPTIONAL {
{
?mandataris mandaat:einde ?persoon_mandaat_einde.
}
UNION
{
FILTER NOT EXISTS {
?mandataris mandaat:einde ?persoon_mandaat_einde.
}
}
?fractie a mandaat:Fractie.
?fractie regorg:legalName ?fractie_naam.
Expand Down Expand Up @@ -1438,9 +1445,16 @@ export const mandateeTableConfigRMW = (meeting) => {
?mandataris mandaat:isBestuurlijkeAliasVan ?persoon.
?mandataris org:hasMembership/org:organisation ?fractie.
?mandataris mandaat:start ?mandaat_start.
OPTIONAL {
{
?mandataris mandaat:einde ?mandaat_einde.
}
UNION
{
FILTER NOT EXISTS {
?mandataris mandaat:einde ?mandaat_einde.
}
}
?fractie a mandaat:Fractie.
?fractie regorg:legalName ?fractie_naam.
Expand Down

0 comments on commit 82d1528

Please sign in to comment.