jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "dan" <danz8...@hotmail.com>
Subject Node.addNode(relPath, nodeType) and javax.jcr.nodetype.ConstraintViolationException
Date Tue, 05 Sep 2006 19:18:27 GMT
Hi all,

Hope this will be a quick question: 

I have the following CND file:
+* (myCM:field)   copy
[myCM::docReferenceField] > myCM:field
+* (myCM:documentReference) = myCM:documentReference
  multiple copy
[myCM:documentReference] >.....

When I call the addNode method of Node D (myCM:document) as below:
D.addNode("new document", "myCM:docReferenceField");

JackRabbit throws  javax.jcr.nodetype.ConstraintViolationException. This is
not correct, is it? 

(According to the specification on child node definition: 
"... but rather that its primary node type (whatever else it may be) must be
at least a subtype of both node types X and Y. Of course, inheritance is
also respected in the simpler case where this attribute specifies only one
primary node type. If it specifies, for example, type T, this means that the
child node must be of type T or a subtype of type T...")


View raw message