You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Tom Quellenberg (JIRA)" <ji...@apache.org> on 2012/10/29 10:19:11 UTC

[jira] [Created] (JCR-3452) Modified property and child node definition are rejected

Tom Quellenberg created JCR-3452:
------------------------------------

             Summary: Modified property and child node definition are rejected
                 Key: JCR-3452
                 URL: https://issues.apache.org/jira/browse/JCR-3452
             Project: Jackrabbit Content Repository
          Issue Type: Bug
    Affects Versions: 2.5.2
            Reporter: Tom Quellenberg
            Priority: Minor
         Attachments: patch.txt

NodeTypeDefDiff identifies modified properties and child nodes by QNodeDefinitionId and QPropertyDefinitionId. Both classes have their own equals and hashCode methods. Thus, properties and child nodes with trivial changes (changed required types or isMultiple) are always considered as added and removed ( = major change) and never as changed.

Additional, the check for required child node types seems wrong to me: adding additional (alternative) constraints are considered as major change. I think, the opposite is true: removing node types from the list of required types is a major change (there may exist child nodes of the removed type), adding alternative constraints is a trivial change.
There is one more change to the required child node types, which can easily be checked: setting the required type to nt:base. This should always be possible.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (JCR-3452) Modified property and child node definition are rejected

Posted by "Tom Quellenberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13506623#comment-13506623 ] 

Tom Quellenberg commented on JCR-3452:
--------------------------------------

Yes, that is correct. BUT, adding additional child node types is making the restriction LESS restrictive and should be allowed. And setting the child not to nt:base makes the restriction LEAST restrictive. Both changes do no harm to existing content. 
                
> Modified property and child node definition are rejected
> --------------------------------------------------------
>
>                 Key: JCR-3452
>                 URL: https://issues.apache.org/jira/browse/JCR-3452
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>    Affects Versions: 2.5.2
>            Reporter: Tom Quellenberg
>            Priority: Minor
>         Attachments: patch.txt
>
>
> NodeTypeDefDiff identifies modified properties and child nodes by QNodeDefinitionId and QPropertyDefinitionId. Both classes have their own equals and hashCode methods. Thus, properties and child nodes with trivial changes (changed required types or isMultiple) are always considered as added and removed ( = major change) and never as changed.
> Additional, the check for required child node types seems wrong to me: adding additional (alternative) constraints are considered as major change. I think, the opposite is true: removing node types from the list of required types is a major change (there may exist child nodes of the removed type), adding alternative constraints is a trivial change.
> There is one more change to the required child node types, which can easily be checked: setting the required type to nt:base. This should always be possible.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (JCR-3452) Modified property and child node definition are rejected

Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507249#comment-13507249 ] 

Stefan Guggisberg commented on JCR-3452:
----------------------------------------

bq. Yes, that is correct. BUT, adding additional child node types is making the restriction LESS restrictive and should be allowed. 

wrong. the required primary node types of a child node definition are logically ANDed during validation, i.e. adding req. types makes the constraint stronger, removing OTOH weaker. see [0].

bq. And setting the child node to nt:base makes the restriction LEAST restrictive.

agreed. that's an edge case that's currently not handled. since the abstract nt:base node type is the root of the node type hierarchy
it is implicitly included in every req. types constraint. explicitly adding or removing nt:base has no effect on the constraint.  

[0] http://www.day.com/specs/jcr/2.0/3_Repository_Model.html#3.7.4.1%20Required%20Primary%20Node%20Types

                
> Modified property and child node definition are rejected
> --------------------------------------------------------
>
>                 Key: JCR-3452
>                 URL: https://issues.apache.org/jira/browse/JCR-3452
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>    Affects Versions: 2.5.2
>            Reporter: Tom Quellenberg
>            Priority: Minor
>         Attachments: patch.txt
>
>
> NodeTypeDefDiff identifies modified properties and child nodes by QNodeDefinitionId and QPropertyDefinitionId. Both classes have their own equals and hashCode methods. Thus, properties and child nodes with trivial changes (changed required types or isMultiple) are always considered as added and removed ( = major change) and never as changed.
> Additional, the check for required child node types seems wrong to me: adding additional (alternative) constraints are considered as major change. I think, the opposite is true: removing node types from the list of required types is a major change (there may exist child nodes of the removed type), adding alternative constraints is a trivial change.
> There is one more change to the required child node types, which can easily be checked: setting the required type to nt:base. This should always be possible.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (JCR-3452) Modified property and child node definition are rejected

Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3452?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Guggisberg updated JCR-3452:
-----------------------------------

    Issue Type: Bug  (was: Improvement)
    
> Modified property and child node definition are rejected
> --------------------------------------------------------
>
>                 Key: JCR-3452
>                 URL: https://issues.apache.org/jira/browse/JCR-3452
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>    Affects Versions: 2.5.2
>            Reporter: Tom Quellenberg
>            Assignee: Stefan Guggisberg
>            Priority: Minor
>             Fix For: 2.6
>
>         Attachments: patch.txt
>
>
> NodeTypeDefDiff identifies modified properties and child nodes by QNodeDefinitionId and QPropertyDefinitionId. Both classes have their own equals and hashCode methods. Thus, properties and child nodes with trivial changes (changed required types or isMultiple) are always considered as added and removed ( = major change) and never as changed.
> Additional, the check for required child node types seems wrong to me: adding additional (alternative) constraints are considered as major change. I think, the opposite is true: removing node types from the list of required types is a major change (there may exist child nodes of the removed type), adding alternative constraints is a trivial change.
> There is one more change to the required child node types, which can easily be checked: setting the required type to nt:base. This should always be possible.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (JCR-3452) Modified property and child node definition are rejected

Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3452?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Guggisberg resolved JCR-3452.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.6
         Assignee: Stefan Guggisberg

fixed in svn r1415685.

trivial modifications
- adding/removing nt:base as requiredPrimaryType constraint 
- making a single-valued property multi-valued 
- changing a property's requiredType constraint to UNDEFINED
                
> Modified property and child node definition are rejected
> --------------------------------------------------------
>
>                 Key: JCR-3452
>                 URL: https://issues.apache.org/jira/browse/JCR-3452
>             Project: Jackrabbit Content Repository
>          Issue Type: Improvement
>    Affects Versions: 2.5.2
>            Reporter: Tom Quellenberg
>            Assignee: Stefan Guggisberg
>            Priority: Minor
>             Fix For: 2.6
>
>         Attachments: patch.txt
>
>
> NodeTypeDefDiff identifies modified properties and child nodes by QNodeDefinitionId and QPropertyDefinitionId. Both classes have their own equals and hashCode methods. Thus, properties and child nodes with trivial changes (changed required types or isMultiple) are always considered as added and removed ( = major change) and never as changed.
> Additional, the check for required child node types seems wrong to me: adding additional (alternative) constraints are considered as major change. I think, the opposite is true: removing node types from the list of required types is a major change (there may exist child nodes of the removed type), adding alternative constraints is a trivial change.
> There is one more change to the required child node types, which can easily be checked: setting the required type to nt:base. This should always be possible.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Comment Edited] (JCR-3452) Modified property and child node definition are rejected

Posted by "Tom Quellenberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13506623#comment-13506623 ] 

Tom Quellenberg edited comment on JCR-3452 at 11/29/12 6:15 PM:
----------------------------------------------------------------

Yes, that is correct. BUT, adding additional child node types is making the restriction LESS restrictive and should be allowed. And setting the child node to nt:base makes the restriction LEAST restrictive. Both changes do no harm to existing content. 
                
      was (Author: quellenberg):
    Yes, that is correct. BUT, adding additional child node types is making the restriction LESS restrictive and should be allowed. And setting the child not to nt:base makes the restriction LEAST restrictive. Both changes do no harm to existing content. 
                  
> Modified property and child node definition are rejected
> --------------------------------------------------------
>
>                 Key: JCR-3452
>                 URL: https://issues.apache.org/jira/browse/JCR-3452
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>    Affects Versions: 2.5.2
>            Reporter: Tom Quellenberg
>            Priority: Minor
>         Attachments: patch.txt
>
>
> NodeTypeDefDiff identifies modified properties and child nodes by QNodeDefinitionId and QPropertyDefinitionId. Both classes have their own equals and hashCode methods. Thus, properties and child nodes with trivial changes (changed required types or isMultiple) are always considered as added and removed ( = major change) and never as changed.
> Additional, the check for required child node types seems wrong to me: adding additional (alternative) constraints are considered as major change. I think, the opposite is true: removing node types from the list of required types is a major change (there may exist child nodes of the removed type), adding alternative constraints is a trivial change.
> There is one more change to the required child node types, which can easily be checked: setting the required type to nt:base. This should always be possible.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (JCR-3452) Modified property and child node definition are rejected

Posted by "Tom Quellenberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507268#comment-13507268 ] 

Tom Quellenberg commented on JCR-3452:
--------------------------------------

> the required primary node types of a child node definition are logically ANDed during validation

Ups, I totally missed this point. Sorry for the confusion.

What about the change of property definitions from single to multiple (I mentioned this problem in the description)? Do I miss there something, too?
                
> Modified property and child node definition are rejected
> --------------------------------------------------------
>
>                 Key: JCR-3452
>                 URL: https://issues.apache.org/jira/browse/JCR-3452
>             Project: Jackrabbit Content Repository
>          Issue Type: Improvement
>    Affects Versions: 2.5.2
>            Reporter: Tom Quellenberg
>            Priority: Minor
>         Attachments: patch.txt
>
>
> NodeTypeDefDiff identifies modified properties and child nodes by QNodeDefinitionId and QPropertyDefinitionId. Both classes have their own equals and hashCode methods. Thus, properties and child nodes with trivial changes (changed required types or isMultiple) are always considered as added and removed ( = major change) and never as changed.
> Additional, the check for required child node types seems wrong to me: adding additional (alternative) constraints are considered as major change. I think, the opposite is true: removing node types from the list of required types is a major change (there may exist child nodes of the removed type), adding alternative constraints is a trivial change.
> There is one more change to the required child node types, which can easily be checked: setting the required type to nt:base. This should always be possible.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (JCR-3452) Modified property and child node definition are rejected

Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13506599#comment-13506599 ] 

Stefan Guggisberg commented on JCR-3452:
----------------------------------------

bq. AFAIU, making something more restrictive than before is considered a "major" change because it could make existing content invalid.

correct. changes that might render existing content illegal according to the new definition are considered major. 
only changes that have no effect on existing content (e.g. making a mandatory item non-mandatory) are allowed.
                
> Modified property and child node definition are rejected
> --------------------------------------------------------
>
>                 Key: JCR-3452
>                 URL: https://issues.apache.org/jira/browse/JCR-3452
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>    Affects Versions: 2.5.2
>            Reporter: Tom Quellenberg
>            Priority: Minor
>         Attachments: patch.txt
>
>
> NodeTypeDefDiff identifies modified properties and child nodes by QNodeDefinitionId and QPropertyDefinitionId. Both classes have their own equals and hashCode methods. Thus, properties and child nodes with trivial changes (changed required types or isMultiple) are always considered as added and removed ( = major change) and never as changed.
> Additional, the check for required child node types seems wrong to me: adding additional (alternative) constraints are considered as major change. I think, the opposite is true: removing node types from the list of required types is a major change (there may exist child nodes of the removed type), adding alternative constraints is a trivial change.
> There is one more change to the required child node types, which can easily be checked: setting the required type to nt:base. This should always be possible.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (JCR-3452) Modified property and child node definition are rejected

Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507346#comment-13507346 ] 

Stefan Guggisberg commented on JCR-3452:
----------------------------------------

bq. What about the change of property definitions from single to multiple (I mentioned this problem in the description)? Do I miss there something, too?

you'e right. changing isMultiple from false to true should be allowed but currently isn't. same with changing the requiredType to UNDEFINED. 
                
> Modified property and child node definition are rejected
> --------------------------------------------------------
>
>                 Key: JCR-3452
>                 URL: https://issues.apache.org/jira/browse/JCR-3452
>             Project: Jackrabbit Content Repository
>          Issue Type: Improvement
>    Affects Versions: 2.5.2
>            Reporter: Tom Quellenberg
>            Priority: Minor
>         Attachments: patch.txt
>
>
> NodeTypeDefDiff identifies modified properties and child nodes by QNodeDefinitionId and QPropertyDefinitionId. Both classes have their own equals and hashCode methods. Thus, properties and child nodes with trivial changes (changed required types or isMultiple) are always considered as added and removed ( = major change) and never as changed.
> Additional, the check for required child node types seems wrong to me: adding additional (alternative) constraints are considered as major change. I think, the opposite is true: removing node types from the list of required types is a major change (there may exist child nodes of the removed type), adding alternative constraints is a trivial change.
> There is one more change to the required child node types, which can easily be checked: setting the required type to nt:base. This should always be possible.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (JCR-3452) Modified property and child node definition are rejected

Posted by "Alexander Klimetschek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13506556#comment-13506556 ] 

Alexander Klimetschek commented on JCR-3452:
--------------------------------------------

AFAIU, making something more restrictive than before is considered a "major" change because it could make existing content invalid.
                
> Modified property and child node definition are rejected
> --------------------------------------------------------
>
>                 Key: JCR-3452
>                 URL: https://issues.apache.org/jira/browse/JCR-3452
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>    Affects Versions: 2.5.2
>            Reporter: Tom Quellenberg
>            Priority: Minor
>         Attachments: patch.txt
>
>
> NodeTypeDefDiff identifies modified properties and child nodes by QNodeDefinitionId and QPropertyDefinitionId. Both classes have their own equals and hashCode methods. Thus, properties and child nodes with trivial changes (changed required types or isMultiple) are always considered as added and removed ( = major change) and never as changed.
> Additional, the check for required child node types seems wrong to me: adding additional (alternative) constraints are considered as major change. I think, the opposite is true: removing node types from the list of required types is a major change (there may exist child nodes of the removed type), adding alternative constraints is a trivial change.
> There is one more change to the required child node types, which can easily be checked: setting the required type to nt:base. This should always be possible.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (JCR-3452) Modified property and child node definition are rejected

Posted by "Tom Quellenberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3452?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tom Quellenberg updated JCR-3452:
---------------------------------

    Attachment: patch.txt
    
> Modified property and child node definition are rejected
> --------------------------------------------------------
>
>                 Key: JCR-3452
>                 URL: https://issues.apache.org/jira/browse/JCR-3452
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>    Affects Versions: 2.5.2
>            Reporter: Tom Quellenberg
>            Priority: Minor
>         Attachments: patch.txt
>
>
> NodeTypeDefDiff identifies modified properties and child nodes by QNodeDefinitionId and QPropertyDefinitionId. Both classes have their own equals and hashCode methods. Thus, properties and child nodes with trivial changes (changed required types or isMultiple) are always considered as added and removed ( = major change) and never as changed.
> Additional, the check for required child node types seems wrong to me: adding additional (alternative) constraints are considered as major change. I think, the opposite is true: removing node types from the list of required types is a major change (there may exist child nodes of the removed type), adding alternative constraints is a trivial change.
> There is one more change to the required child node types, which can easily be checked: setting the required type to nt:base. This should always be possible.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (JCR-3452) Modified property and child node definition are rejected

Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3452?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Guggisberg updated JCR-3452:
-----------------------------------

    Issue Type: Improvement  (was: Bug)
    
> Modified property and child node definition are rejected
> --------------------------------------------------------
>
>                 Key: JCR-3452
>                 URL: https://issues.apache.org/jira/browse/JCR-3452
>             Project: Jackrabbit Content Repository
>          Issue Type: Improvement
>    Affects Versions: 2.5.2
>            Reporter: Tom Quellenberg
>            Priority: Minor
>         Attachments: patch.txt
>
>
> NodeTypeDefDiff identifies modified properties and child nodes by QNodeDefinitionId and QPropertyDefinitionId. Both classes have their own equals and hashCode methods. Thus, properties and child nodes with trivial changes (changed required types or isMultiple) are always considered as added and removed ( = major change) and never as changed.
> Additional, the check for required child node types seems wrong to me: adding additional (alternative) constraints are considered as major change. I think, the opposite is true: removing node types from the list of required types is a major change (there may exist child nodes of the removed type), adding alternative constraints is a trivial change.
> There is one more change to the required child node types, which can easily be checked: setting the required type to nt:base. This should always be possible.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira