cancel
Showing results for 
Search instead for 
Did you mean: 

NodeRef and Association

ojio_bis
Champ in-the-making
Champ in-the-making
Hi,

Can anyone help me understand the nodereference datatype ? I am getting confused between Noderef and assocations.
Is there any usecases where I should go for noderef ?

May be this a noob question, but I am new to cms world  Smiley Very Happy
Thanks,
Ojio
3 REPLIES 3

ojio_bis
Champ in-the-making
Champ in-the-making
Ok let me try to ask a question with a use case.

Suppose we have a article and author node. Article "has-a" relationship with author.
I can model this as a peer association with source as article and author as node.

If I see this effectively this is a NodeReference (foreign key).
Is it possible to have a article property with a node reference type rather than an association ???.

Thanks
Ojio

mrogers
Star Contributor
Star Contributor
A node ref is a primary key for a node.

An association is a link between two nodes.     The association has a name and a type and contains two node refs, one for the parent and one for the child.  In addition an association can be primary or secondary.   A node has one Primary association and will cascade delete the child on deletion of the parent.    Secondary associations are aggregations and are many to many.

In your case the relationship between the article and the author is probably some sort of secondary association.

ojio_bis
Champ in-the-making
Champ in-the-making
Thanks a lot mrogers for clarifying this.  Smiley Very Happy