Allow the removal of an item even if its schema has changed
-----------------------------------------------------------

                 Key: JCR-542
                 URL: http://issues.apache.org/jira/browse/JCR-542
             Project: Jackrabbit
          Issue Type: Improvement
          Components: core
    Affects Versions: 1.0.1
            Reporter: Florent Guillaume
            Priority: Minor


During schema migrations, it is often the case that an item definition changes. 
For instance, a property may move from type Long to type String.
However when jackrabbit is restarted, it's impossible to remove any node having 
"old" properties:

javax.jcr.nodetype.ConstraintViolationException: no matching property 
definition found for {}myprop
        at 
org.apache.jackrabbit.core.nodetype.EffectiveNodeType.getApplicablePropertyDef(EffectiveNodeType.java:797)
        at 
org.apache.jackrabbit.core.NodeImpl.getApplicablePropertyDefinition(NodeImpl.java:913)
        at 
org.apache.jackrabbit.core.ItemManager.getDefinition(ItemManager.java:161)
        at 
org.apache.jackrabbit.core.ItemManager.createPropertyInstance(ItemManager.java:522)
        at 
org.apache.jackrabbit.core.ItemManager.createItemInstance(ItemManager.java:477)
        at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:320)
        at org.apache.jackrabbit.core.NodeImpl.onRemove(NodeImpl.java:674)
        at 
org.apache.jackrabbit.core.NodeImpl.removeChildNode(NodeImpl.java:623)
        at org.apache.jackrabbit.core.ItemImpl.internalRemove(ItemImpl.java:848)
        at org.apache.jackrabbit.core.ItemImpl.remove(ItemImpl.java:1034)

I don't understand enough of the internals to know if it's easy, but could 
something be made more lenient to allow such removals?


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to