I think the normal way to do this in Cargo would be not to have the inverse property stored in a page's data, but rather to query the inverse wherever required. So, for example, an Idaho page would define part_of as USA, and then on the USA page you could have a template that displays all the composed_of pages: {{#cargo query: tables = places | where = part_of HOLDS 'USA' }}. This way, there's no double-entry of values and so nothing to get out of sync.

On 31/8/21 6:42 am, David Epstein wrote:
If a class has a /composed_of /property and a /part_of/ property, can I define these somewhere as inverse relationships? I'd like to set Idaho as /part_of/ the USA and then (automatically) see that assignment in USA's /composed_of /list?

Moreover, is it possible to specify that the properties have a more specific domain, not just any page but only pages from the category "Place"?






_______________________________________________
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org
List information: 
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
_______________________________________________
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org
List information: 
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/

Reply via email to