AnsweredAssumed Answered

associations

Question asked by turgayz on Feb 1, 2006
Latest reply on Feb 2, 2006 by rwetherall
Hi,
I am confused about associations. Can you please tell me when should I create an "association", and in which case it should be a "child-association"?

I am trying to create a model, in which a "taskList" can have lots of "task"s.

Should I define it like:

<type name="tl:taskList">
         <parent>cm:folder</parent>
         <associations>
            <association name="tl:taskOfTaskList">
               <target>
                  <class>tl:task</class>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </target>
            </association>
         </associations>
      </type>

or like:

<type name="tl:taskList">
         <parent>cm:folder</parent>
         <associations>
            <child-association name="tl:taskOfTaskList">
               <target>
                  <class>tl:task</class>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </target>
            </child-association>
         </associations>
      </type>

Is there an example describing when to use association and when to use child-association?

Outcomes