You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Ard Schrijvers (JIRA)" <ji...@apache.org> on 2012/05/25 11:42:24 UTC

[jira] [Created] (OCM-48) DefaultCollectionConverterImpl should take nodetype into account for doInsertCollection and doUpdateCollection

Ard Schrijvers created OCM-48:
---------------------------------

             Summary: DefaultCollectionConverterImpl should take nodetype into account  for doInsertCollection and doUpdateCollection
                 Key: OCM-48
                 URL: https://issues.apache.org/jira/browse/OCM-48
             Project: Jackrabbit OCM
          Issue Type: Bug
            Reporter: Ard Schrijvers
            Assignee: Ard Schrijvers


>From Will Scheidegger : 

Hi Ard

This is only very vaguely related to what you are doing,… but since you seem to have commit rights on OCM and you will be working on it:

A long time ago I discussed a bug in the DefaultCollectionConverterImpl class [1]. It seems like this bug still exists today [2]. I'm not sure, but I think I provided a patch back then. In any case, the patch would be:

--- Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -111,7 +111,7 @@
                    + collectionDescriptor.getFieldName() + " for the classdescriptor : " + collectionDescriptor.getClassDescriptor().getClassName());
        }

-        Node collectionNode = parentNode.addNode(jcrName);
+        Node collectionNode = parentNode.addNode(jcrName, collectionDescriptor.getJcrType());

        ClassDescriptor elementClassDescriptor = mapper.getClassDescriptorByClass( ReflectionUtils.forName(collectionDescriptor.getElementClassName()));

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Resolved] (OCM-48) DefaultCollectionConverterImpl should take nodetype into account for doInsertCollection and doUpdateCollection

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

Ard Schrijvers resolved OCM-48.
-------------------------------

    Resolution: Fixed

issue fixed. Thx Will for indicating it. It was a bit more subtle in the end, also see OCM-50


                
> DefaultCollectionConverterImpl should take nodetype into account  for doInsertCollection and doUpdateCollection
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: OCM-48
>                 URL: https://issues.apache.org/jira/browse/OCM-48
>             Project: Jackrabbit OCM
>          Issue Type: Bug
>            Reporter: Ard Schrijvers
>            Assignee: Ard Schrijvers
>             Fix For: 2.0.0
>
>
> From Will Scheidegger : 
> Hi Ard
> This is only very vaguely related to what you are doing,… but since you seem to have commit rights on OCM and you will be working on it:
> A long time ago I discussed a bug in the DefaultCollectionConverterImpl class [1]. It seems like this bug still exists today [2]. I'm not sure, but I think I provided a patch back then. In any case, the patch would be:
> --- Base (BASE)
> +++ Locally Modified (Based On LOCAL)
> @@ -111,7 +111,7 @@
>                     + collectionDescriptor.getFieldName() + " for the classdescriptor : " + collectionDescriptor.getClassDescriptor().getClassName());
>         }
> -        Node collectionNode = parentNode.addNode(jcrName);
> +        Node collectionNode = parentNode.addNode(jcrName, collectionDescriptor.getJcrType());
>         ClassDescriptor elementClassDescriptor = mapper.getClassDescriptorByClass( ReflectionUtils.forName(collectionDescriptor.getElementClassName()));

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (OCM-48) DefaultCollectionConverterImpl should take nodetype into account for doInsertCollection and doUpdateCollection

Posted by "Ard Schrijvers (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OCM-48?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13283254#comment-13283254 ] 

Ard Schrijvers commented on OCM-48:
-----------------------------------

Note that implementations that rely on the faulty 

Node collectionNode = parentNode.addNode(jcrName);

instead of 

parentNode.addNode(jcrName, collectionDescriptor.getJcrType());

might be influenced when we fix this. There are currently unit tests that fail when the bug is fixed.

Either way, since this will be part of first OCM release against jr 2.0+ this is in my opinion acceptable. 

Ard
                
> DefaultCollectionConverterImpl should take nodetype into account  for doInsertCollection and doUpdateCollection
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: OCM-48
>                 URL: https://issues.apache.org/jira/browse/OCM-48
>             Project: Jackrabbit OCM
>          Issue Type: Bug
>            Reporter: Ard Schrijvers
>            Assignee: Ard Schrijvers
>
> From Will Scheidegger : 
> Hi Ard
> This is only very vaguely related to what you are doing,… but since you seem to have commit rights on OCM and you will be working on it:
> A long time ago I discussed a bug in the DefaultCollectionConverterImpl class [1]. It seems like this bug still exists today [2]. I'm not sure, but I think I provided a patch back then. In any case, the patch would be:
> --- Base (BASE)
> +++ Locally Modified (Based On LOCAL)
> @@ -111,7 +111,7 @@
>                     + collectionDescriptor.getFieldName() + " for the classdescriptor : " + collectionDescriptor.getClassDescriptor().getClassName());
>         }
> -        Node collectionNode = parentNode.addNode(jcrName);
> +        Node collectionNode = parentNode.addNode(jcrName, collectionDescriptor.getJcrType());
>         ClassDescriptor elementClassDescriptor = mapper.getClassDescriptorByClass( ReflectionUtils.forName(collectionDescriptor.getElementClassName()));

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (OCM-48) DefaultCollectionConverterImpl should take nodetype into account for doInsertCollection and doUpdateCollection

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

Ard Schrijvers updated OCM-48:
------------------------------

    Fix Version/s: 2.0.0
    
> DefaultCollectionConverterImpl should take nodetype into account  for doInsertCollection and doUpdateCollection
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: OCM-48
>                 URL: https://issues.apache.org/jira/browse/OCM-48
>             Project: Jackrabbit OCM
>          Issue Type: Bug
>            Reporter: Ard Schrijvers
>            Assignee: Ard Schrijvers
>             Fix For: 2.0.0
>
>
> From Will Scheidegger : 
> Hi Ard
> This is only very vaguely related to what you are doing,… but since you seem to have commit rights on OCM and you will be working on it:
> A long time ago I discussed a bug in the DefaultCollectionConverterImpl class [1]. It seems like this bug still exists today [2]. I'm not sure, but I think I provided a patch back then. In any case, the patch would be:
> --- Base (BASE)
> +++ Locally Modified (Based On LOCAL)
> @@ -111,7 +111,7 @@
>                     + collectionDescriptor.getFieldName() + " for the classdescriptor : " + collectionDescriptor.getClassDescriptor().getClassName());
>         }
> -        Node collectionNode = parentNode.addNode(jcrName);
> +        Node collectionNode = parentNode.addNode(jcrName, collectionDescriptor.getJcrType());
>         ClassDescriptor elementClassDescriptor = mapper.getClassDescriptorByClass( ReflectionUtils.forName(collectionDescriptor.getElementClassName()));

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira