How make a two direction link between documents
There are two documents with a schema's field:
<xs:element name="link" type="nxs:stringList" />
The field is updated by widget:
<widget name="link_path_widget" type="select_path_tree">
This works very well but there is only created one way link. What is the most elegant way to create the two direction link between two documents? It means when it is set in one document, the second is automaticaly updated.
Have a look at the “relation” concept in Nuxeo (you can create your own relation predicates), it looks like what you are searching for.
Besides relations, another option is to use a “document suggestion” widget to point to another document in a field.
From this other document, you could display a content view performing a query to retrieve all documents where the given field value is the current document id.