[ 
https://issues.apache.org/jira/browse/JCR-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12637177#action_12637177
 ] 

clombart edited comment on JCR-1784 at 10/6/08 12:12 PM:
-------------------------------------------------------------------

Your patch seems good but I'm wondering why you have modified the class 
AbstractMapperImpl ( see [1]).
It works without this modification and we can leave the code as it is (throw an 
exception is there is no descriptor). 
Are you agree if we don't modify this class ?




[1] Index: 
src/main/java/org/apache/jackrabbit/ocm/mapper/impl/AbstractMapperImpl.java
===================================================================
--- src/main/java/org/apache/jackrabbit/ocm/mapper/impl/AbstractMapperImpl.java 
(revision 701632)
+++ src/main/java/org/apache/jackrabbit/ocm/mapper/impl/AbstractMapperImpl.java 
(working copy)
@@ -200,7 +200,7 @@
    public ClassDescriptor getClassDescriptorByClass(Class clazz) {
           ClassDescriptor descriptor = 
mappingDescriptor.getClassDescriptorByName(clazz.getName());
           if (descriptor==null) {
-                       throw new IncorrectPersistentClassException("Class of 
type: " + clazz.getName() + " has no descriptor.");
+                       //throw new IncorrectPersistentClassException("Class of 
type: " + clazz.getName() + " has no descriptor.");
           }
        return descriptor ;
    }



      was (Author: clombart):
    Your patch seems good but I'm wondering why you have modified the class 
AbstractMapperImpl ( see [1]).
It works without this modification and we can leave the code as it is (throw an 
exception is there is no descriptor). 
Are you agree if we don't modify this class ?




[1] Index: 
src/main/java/org/apache/jackrabbit/ocm/mapper/impl/AbstractMapperImpl.java
===================================================================
--- src/main/java/org/apache/jackrabbit/ocm/mapper/impl/AbstractMapperImpl.java 
(revision 701632)
+++ src/main/java/org/apache/jackrabbit/ocm/mapper/impl/AbstractMapperImpl.java 
(working copy)
@@ -200,7 +200,7 @@
    public ClassDescriptor getClassDescriptorByClass(Class clazz) {
           ClassDescriptor descriptor = 
mappingDescriptor.getClassDescriptorByName(clazz.getName());
           if (descriptor==null) {
-                       throw new IncorrectPersistentClassException("Class of 
type: " + clazz.getName() + " has no descriptor.");
+                       //throw new IncorrectPersistentClassException("Class of 
type: " + clazz.getName() + " has no descriptor.");
           }
        return descriptor ;
    }

Index: 
src/main/java/org/apache/jackrabbit/ocm/mapper/impl/AbstractMapperImpl.java
===================================================================
--- src/main/java/org/apache/jackrabbit/ocm/mapper/impl/AbstractMapperImpl.java 
(revision 701632)
+++ src/main/java/org/apache/jackrabbit/ocm/mapper/impl/AbstractMapperImpl.java 
(working copy)
@@ -200,7 +200,7 @@
    public ClassDescriptor getClassDescriptorByClass(Class clazz) {
           ClassDescriptor descriptor = 
mappingDescriptor.getClassDescriptorByName(clazz.getName());
           if (descriptor==null) {
-                       throw new IncorrectPersistentClassException("Class of 
type: " + clazz.getName() + " has no descriptor.");
+                       //throw new IncorrectPersistentClassException("Class of 
type: " + clazz.getName() + " has no descriptor.");
           }
        return descriptor ;
    }

  
> OCM:The UUID of the collection elements changes on update.
> ----------------------------------------------------------
>
>                 Key: JCR-1784
>                 URL: https://issues.apache.org/jira/browse/JCR-1784
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-ocm
>    Affects Versions: 1.5
>            Reporter: Boni Gopalan
>            Assignee: Christophe Lombart
>             Fix For: 1.5
>
>         Attachments: JCR-1784.bonigopalan.patch
>
>   Original Estimate: 3h
>  Remaining Estimate: 3h
>
> On ocm.update transaction, the  Current implementation of 
> DefaultCollectionConverterImpl recreates the colleciton-element nodes if 
> there is no id field specificaiton.  This is completely valid for majority of 
> the cases.  But I came across a case where the colleciton element has a uuid 
> field.  In this case also what is happening with the current implementation 
> is that it drops all the elements from the old collection-elements and 
> recreates the new ones.  The major flip side is that now I am left with brand 
> new UUIDs.  I think we should address the uniqueness characteristics 
> specified through UUID also while mapping colleciton elements.
> I have a patch and a TestCase to verify the same.  I have implemented it only 
> for the digester.  If people feel the approach is right I will work out an 
> annotation based testcase as well.  I do not think it is going to fail even 
> with annotations.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to