1 Reply Latest reply on Jan 10, 2012 8:00 PM by meetoblivion

    Usage of JcrNode annotation value attribute

    jonne.deprez

      What is the use of the value attribute of the JcrNode annotation? When persisting a node the OCMHandler creates a new node based on the path, but the NodeType is not taken into account.
      I'm trying to create a new nt:folder node inside an already existing nt:folder node. The OCM mapping class is simply:


      @JcrNode("nt:folder")
      public class FolderNode {
      
          private String uuid;
      
          public String getUuid() {
              return uuid;
          }
      
          public void setUuid(String uuid) {
              this.uuid = uuid;
          }
      }
      



      The parent node restricts the children to nodes of types of nt:folder, nt:file, etc. I would expect this to work, but it fails with a ConstraintViolationException.


      Am I right that with the Seam JCR module only nodes of type nt:unstructured can be used?