AnsweredAssumed Answered

Integrity Check problem when adding a node?

Question asked by blatwurst on Oct 24, 2007
Latest reply on Oct 24, 2007 by blatwurst
Can someone please help me understand what's going on here?  Why does this:

        obj.addAspect("app:configurable");
        obj = obj.createNode("app:configurations", "app:configurations", "app:configurations");
produce this error:

Invalid property value: 
   Node: workspace://SpacesStore/c3764e1f-8235-11dc-b853-a9503a1a1ee3
   Type: {http://www.alfresco.org/model/application/1.0}configurations
   Property: {http://www.alfresco.org/model/content/1.0}name
   Constraint: Value 'app:configurations' matches regular expression: (.*[\"\*\\\>\<\?\/\:\|]+.*)|(.*[\.]?.*[\.]+$)|(.*[ ]+$)

It's complaining about the ':' in the name of the association (the first parameter to createNode).  I tried this too, with the same result:

        obj.addAspect("app:configurable");
        var props = new Array();
        props["cm:name"] = "blah blah blah";
        obj = obj.createNode("app:configurations", "app:configurations", props, "app:configurations");

This code succeeds:

        obj.addAspect("app:configurable");
        obj = obj.createNode("configurations", "app:configurations", "app:configurations");

but then the name of the resulting association is "cm:configurations" rather than "app:configurations".  The fact that this works says to me that what I'm trying to do should work.  That is, the value I'm providing should be able to be qualified with a namespace since the default namespace is added to the value I provide if I don't specify one explicitly.

Do I have to turn off integrity checks to make this node? That seems harsh.  BTW, I'm trying to reproduce the same node relationship that exists below each "person" node.

Any help would be appreciated.

Outcomes