cancel
Showing results for 
Search instead for 
Did you mean: 

sys:base type and cm:name property

benjamin_doughe
Champ in-the-making
Champ in-the-making
I created a new type with the parent sys:base and no property definitions or aspects. I created the node then noticed in the node browser that the property cm:name had been applied.

Can you tell me why that is?

Thanks,
Ben.
2 REPLIES 2

kevinr
Star Contributor
Star Contributor
What API did you use to create the node?

benjamin_doughe
Champ in-the-making
Champ in-the-making
Oops sorry just noticed this has been replied to I'll tick the notification box this time…

Here is my code:

         // Apply the tasteable aspect
           nodeService.addAspect(actionedUponNodeRef, StoryModel.ASPECT_TASTEABLE, null);
          
         // Create a target for the associations
           NodeRef tasteNodeRef = this.nodeService.createNode(actionedUponNodeRef, StoryModel.ASSOC_TYPE_QNAME_TASTE,
                StoryModel.ASSOC_TYPE_QNAME_TASTE, StoryModel.TYPE_TASTE).getChildRef();

           this.nodeService.setProperty(tasteNodeRef, StoryModel.PROP_QNAME_TASTE_DATE, new Date());
           this.nodeService.setProperty(tasteNodeRef, StoryModel.PROP_QNAME_TASTE_PERSON, getUsername());

Here is my model:

<types>
   <type name="sm:taste">
         <title>Taste</title>
         <parent>sys:base</parent>
         <properties>
            <property name="sm:date">
               <type>d:date</type>
            </property>
            <property name="smSmiley Tongueerson">
               <type>d:text</type>
            </property>
         </properties>
      </type>
   </types>

   <aspects>

      <aspect name="sm:tasteable">
         <title>Tasteable</title>
         <associations>
            <child-association name="sm:tasteChild">
               <source>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </source>
               <target>
                        <class>sm:taste</class>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </target>
            </child-association>
         </associations>
      </aspect>
</aspects>

Thanks,
Ben.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.