AnsweredAssumed Answered

Problem with associations

Question asked by ruben.arjonilla on Feb 1, 2011
Latest reply on Feb 14, 2011 by ruben.arjonilla
Hi,

I have a question about associations.
Let me give an example, I have these 2 types, A and B, where B defines an association of A type documents
<type name="x:a">
   <title>A</title>
   <parent>cm:content</parent>
   <properties>
      <property name="x:campo1">
         <title>campo 1</title>
         <description>Descripción campo 1</description>
         <type>d:text</type>
         <mandatory>false</mandatory>
         <default></default>
      </property>
   </properties>
</type>
<type name="x:b">
   <title>B</title>
   <parent>cm:content</parent>
   <properties>
      <property name="x:campo2">
         <title>campo 2</title>
         <description>Descripción campo 2</description>
         <type>d:text</type>
         <mandatory>false</mandatory>
         <default></default>
      </property>
   </properties>

   <associations>
      <association name="x:asocA">
         <title>Asociaciones con documentos A</title>
         <description>Asociación de documentos del tipo A</description>
         <source>
            <mandatory>false</mandatory>
            <many>true</many>
         </source>
         <target>
            <class>x:a</class>
            <mandatory>false</mandatory>
            <many>true</many>
         </target>
      </association>
   </associations>
</type>

Now imagine that I have a document of type A and a document of type B
A1.txt
B1.txt –> has an association with the document A1.txt

If I remove A1.txt, the association in B1.txt is still there,  but of course, can not find it because this document doesn't exists.
Is there any way that this association automatically is deleted when I delete A1.txt?

Thank you very much in advance.

Outcomes