[ 
https://issues.apache.org/jira/browse/OAK-9621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17442696#comment-17442696
 ] 

Julian Reschke edited comment on OAK-9621 at 11/12/21, 11:47 AM:
-----------------------------------------------------------------

So Oak (and presumably Jackrabbit) support node types (combining 
mandatory+residual constraints) that aren't allowed per the JCR spec.

Options:
 # Change the implementations to reject these node type definitions. That would 
be the "correct" approach, but would apparently break existing installations 
(see JCRVLT-549 where this came up first). It would also require some form of 
migration for existing content. ({_}not realistic, just added for 
completeness{_})
 # Keep the current implementation (node type is accepted, but constraint is 
not enforced). _(this has the best backwards compat story, as we do not change 
anything)_
 # Accept the node type, and actually try to enforce it.

I think we should investigate the last option ("fixing it"), because there's 
presumably a reason why people use these node definitions.

In any case (except for the first option), we need to document this deviation 
from the spec properly.


was (Author: reschke):
So Oak (and presumably Jackrabbit) support node types that aren't allowed per 
the JCR spec.

Options:
 # Change the implementations to reject these node type definitions. That would 
be the "correct" approach, but would apparently break existing installations 
(see JCRVLT-549 where this came up first). It would also require some form of 
migration for existing content. ({_}not realistic, just added for 
completeness{_})
 # Keep the current implementation (node type is accepted, but constraint is 
not enforced). _(this has the best backwards compat story, as we do not change 
anything)_
 # Accept the node type, and actually try to enforce it.

I think we should investigate the last option ("fixing it"), because there's 
presumably a reason why people use these node definitions.

In any case (except for the first option), we need to document this deviation 
from the spec properly.

> Mandatory child nodes without name constraints are not enforced
> ---------------------------------------------------------------
>
>                 Key: OAK-9621
>                 URL: https://issues.apache.org/jira/browse/OAK-9621
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>    Affects Versions: 1.42.0
>            Reporter: Konrad Windszus
>            Priority: Major
>
> Node types may have mandatory child nodes.
> Those constraints are not enforced when creating new nodes or deleting the 
> mandatory child node if the mandatory child node has no name constraint. It 
> works well if the mandatory child node has a name constraint as well.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to