OpenWGA 7.6 - Query languages reference

hdbmodel

hdbmodel:relationsources:<relationname>

This query retrieves all contents which target the current context document by a defined relation. The document in WebTML context must be the document which is targeted by these relations.

This query type can also be used via TMLScript with method HDBModel.getRelationSources().

It is mandatory for this query to specify the content class of the contents which own the relation as native query option. Otherwise you may leave the query body empty:

<tml:query type="hdbmodel:relationsources:targetbuild" options="contentclass:issue"/>

But here also you may add custom selection statements at your liking:

<tml:query type="hdbmodel:relationsources:targetbuild" options="contentclass:issue">content.items['closed'].boolean = 1</tml:query>

It is also allowed to let the query include an "order by" clause, which defines an output order just like in query type "hql".

This query type also works with relation groups, in which case the given name is used as relation group name. The query uses the model definition to determine if the relation of that name is a group or not.