Comment class

Create a comment class. It will store user comments on articles.

Create a name attribute, String type. It will store commentator name. Check Required box.

Create a email attribute, String type. It will store commentator's email address. Check Required box. Go to Validation tab of the attribute form and add Email validator. It will check string against the email address format.

Create a content attribute, Text type. It will store comment text. Check Required box. Go to Validation tab of the attribute form and add String validator. Set Maximum length parameter to 256 characters.

Create a article attribute, Reference type. It will keep a comment link to article. Select article class in the Reference class field. Check Required box.

The Back reference type defines a relation through an attribute of a reference class. If article photos are retrieved from the links that are kept in article itself, then article comments are retrieved from article link that is kept in comment.

Open the article class and create the comments attribute, Back reference type. Select comment class in the Reference class field and select article attribute in the Reference attribute field. Check Multiple box. One article may have many comments. Uncheck the Add and Remove commands because a comment cannot be attached to another article.

Export metadata and go to Office. Create an article and add comments to it.