cancel
Showing results for 
Search instead for 
Did you mean: 

problem with using child association defined in model.xml

pmarreddy
Champ in-the-making
Champ in-the-making
hi ,

i have problem understanding how child associations work, when defining in xml. i have searched in the datadictonary model, there i came to know how to define it.  i cannot find how to use it. when i am trying to use it i am getting this warning

16:26:50,640 WARN  [node.integrity.IntegrityChecker] Found 2 integrity violations:
Association type does not exist:
   Association Type: {{cube.com}contains}child
Association type does not exist:
   Association Type: {{cube.com}contains}child prop


i have defined my model


            <child-association name="cube:contains">
               <source>
                  <mandatory>false</mandatory>
                  <many>false</many>
               </source>
           
               <target>
                  <class>cm:content</class>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </target>
            </child-association>  

assocRef = nodeService.createNode(
                     node1,
                     QName.createQName("{cube.com}contains","child"),
                      QName.createQName(NAMESPACE, QName.createValidLocalName("node2")),
                      QName.createQName("{cube.com}exam"),
                      nodeProperties);
1 REPLY 1

pmarreddy
Champ in-the-making
Champ in-the-making
it ok i got it

assocRef = nodeService.createNode(
node1,
QName.createQName("cube.com","contains"),
QName.createQName(NAMESPACE, QName.createValidLocalName("node2")),
QName.createQName("{cube.com}exam"),
nodeProperties);