There are currently two properties with “used as qualifier” and “distinct values” constraints (query). We need to support that, but it’s not trivial because the SPARQL query we use gets somewhat more complicated.
Related Gerrit Patches:
|mediawiki/extensions/WikibaseQualityConstraints : master||Check “unique value” constraint on qualifiers and references|
|Resolved||Lucas_Werkmeister_WMDE||T173695 Enable constraint checks by default for users|
|Resolved||Lucas_Werkmeister_WMDE||T168532 Check constraints on qualifiers and references|
|Resolved||Lucas_Werkmeister_WMDE||T175561 Check distinct values (unique value) constraint on qualifiers and references|
Two semantics questions:
- Is it a constraint violation if the same value is used in a statement and elsewhere in a qualifier? Or should values only be distinct between all main snaks / all qualifiers / all references? (My current WIP implementation only checks uniqueness within one “kind” of snak – main snak, qualifier, or reference.)
- Is it a constraint violation if the exact same reference (same hash, same RDF node) is used several times (on the same entity or on different entities) and includes a “distinct values” property?