cancel
Showing results for 
Search instead for 
Did you mean: 

2-Way Association

steel
Champ in-the-making
Champ in-the-making
I may have missed it in the documentation but is there a way to create an association where the objects know of each other?

Example:

A (*) <——-> (*) B

Where B can be associated to many A's and vice versa and each A knows about all the B's that it's associated with and each B knows of all the A's that it is associated with.

thanks!
2 REPLIES 2

davidc
Star Contributor
Star Contributor
An example is shown at http://wiki.alfresco.com/wiki/Data_Dictionary_Guide#Step_6:_Defining_Associations.

The various APIs provide methods for getting objects at each end of the association.  The Web Client can also show/edit associations as described at http://wiki.alfresco.com/wiki/Displaying_Custom_Metadata#Associations_in_the_Web_Client.

marcus
Champ in-the-making
Champ in-the-making
I'm just bumping this topic because I have an extension to the original question, or maybe just a redefinition as bi-directional association. If I create an associate from document A to document B, and both document A and B have the same type / aspect that defines the association, then is there a way I can have that association display when I view document B? At the moment it shows for document A, but not B. I can see why it wouldn't be desirable to have it automatically be a bi-directional relationship, but it'd be nice to be able to configure it as such.

For me, an example of a bi-directional relationship would be "Related Document" where it would make sense for the association to look both ways, whereas a one directional relationship might be "Sequel" where it doesn't make sense for the second linked document to be linked back to the parent in the Sequel association (though, it might if it had a Predecessor association… but I digress).

Maybe a child association is what's needed there in the second example, but my understanding is that actions will propagate along a child-association line, and that's not what I want to happen.