Help:Property constraints portal/Inverse
|This is the documentation page for a particular constraint type. See Help:Property constraints portal for a general overview of property constraints.|
inverse constraint (Q21510855) specifies that a property has an inverse property, and values for the property should have a statement with the inverse property pointing back to the original item.
If no constraint scope (P4680) is specified, this constraint is only checked on the main value of a statement. This is also the only currently supported scope.
There are several possible ways to address a violation of this constraint:
- The most likely case is that the inverse statement should be added to the other item, where it is missing. As there may be many such cases, a frequent approach is to do this by bot.
- It’s possible that the current item should not have the statement at all, and that the statement should be removed.
- It’s possible that the item is a rare, but legitimate exception to the constraint, and nothing should be done.
This constraint has one mandatory parameter:
Example setting for mother (P25).
When the constraint is set to the property, the following template is automatically displayed in the property talk page. The template is created by Module:Constraints using Template:Constraint, invoked from Template:Property documentation. Translations are defined at Module:i18n/constraints.
Inverse property of “child (P40)”:Exceptions are possible as rare values may exist.
if [item A] has this property (mother (P25)) linked to [item B],
then [item B] should also have property “child (P40)” linked to [item A]. (Help)
List of this constraint violations: Database reports/Constraint violations/P25#Inverse, SPARQL, SPARQL (new)
Lists of properties which are set inverse constraint.