You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Alexander Klimetschek (JIRA)" <ji...@apache.org> on 2010/01/27 10:49:34 UTC
[jira] Commented: (JCR-2479) Adding a Mixin-type with mandatory
properties after setting these properties throws exception
[ https://issues.apache.org/jira/browse/JCR-2479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12805442#action_12805442 ]
Alexander Klimetschek commented on JCR-2479:
--------------------------------------------
Looking at the JCR 2.0 spec again, I guess this is due to this special definition:
3.7.2.4.3 Mandatory and Residual Definitions
In repositories that support residual definitions, an item cannot be both
mandatory and residual (see ยง3.7.2.1.2 Item Definition Name and Residual Definitions).
> Adding a Mixin-type with mandatory properties after setting these properties throws exception
> ---------------------------------------------------------------------------------------------
>
> Key: JCR-2479
> URL: https://issues.apache.org/jira/browse/JCR-2479
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Affects Versions: 2.0-beta6
> Reporter: Martin Buergi
> Priority: Critical
>
> Testcase:
> nodetype definition with mandatory property:
> [nt:foo]
> mixin
> - bar(string) mandatory
> this throws the exception "mandatory property {}bar does not exist":
> Node node = session.getRootNode().addNode("test");
> node.setProperty("bar", "test");
> node.addMixin("nt:foo");
> node.getSession().save();
> and this works at least with alpha 4 and before:
> Node node = session.getRootNode().addNode("test");
> node.addMixin("nt:foo");
> node.setProperty("bar", "test");
> node.getSession().save();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.