cancel
Showing results for 
Search instead for 
Did you mean: 

How make a two direction link between documents

adam_bo_
Star Contributor
Star Contributor

There are two documents with a schema's field: <xs:element name="link" type="nxs:stringList" />

The field is updated by widget:

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.

1 ACCEPTED ANSWER

patrek
Star Contributor
Star Contributor

Have a look at the "relation" concept in Nuxeo (you can create your own relation predicates), it looks like what you are searching for.

View answer in original post

4 REPLIES 4

patrek
Star Contributor
Star Contributor

Have a look at the "relation" concept in Nuxeo (you can create your own relation predicates), it looks like what you are searching for.

adam_bo_
Star Contributor
Star Contributor

Yes, you are right. It seems to be good way. Thanks

adam_bo_
Star Contributor
Star Contributor

I have analized the code and it looks that it is too much complicated for this simple task.

Anahide_Tchertc
Elite Collaborator
Elite Collaborator

Hi,

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.