[
https://issues.apache.org/jira/browse/JCR-2479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12805469#action_12805469
]
Thomas Mueller commented on JCR-2479:
-------------------------------------
For me, it is a bit strange that the mixing needs to be added first. But that's
how it is currently.
For data migration (data first, structure later) it does sound like a
reasonable feature request.
Martin, could you explain why in your case you want to add the mixin _after_
adding the property?
> 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.