Hi,

I'm sure I'm not using the right channel, but this page
http://www.apache.org/dev/contrib-email-tips.html
Was too confusing, I don't want to invest 1h time to help out with a simple fix.



When using the @Collection tag on lists (where the element is a node WITH an 
ID):

The class DefaultCollectionConverterImpl (in version 2.0.0 of the OCM) around 
lines at line 230:


        while (collectionIterator.hasNext()) {

            Object item = collectionIterator.next();

            String elementJcrName = null;



            if (elementClassDescriptor.hasUUIdField()){

            elementJcrName = collectionDescriptor.getJcrElementName();

            elementJcrName = (elementJcrName == null)? COLLECTION_ELEMENT_NAME 
: elementJcrName;



Should be:

        while (collectionIterator.hasNext()) {

            Object item = collectionIterator.next();

            String elementJcrName = null;



            if (elementClassDescriptor.hasUUIdField()){

if (elementClassDescriptor.hasIdField()) {

                 String idFieldName = 
elementClassDescriptor.getIdFieldDescriptor().getFieldName();

                elementJcrName = ReflectionUtils.getNestedProperty(item, 
idFieldName).toString();

}

else {

            elementJcrName = collectionDescriptor.getJcrElementName();

}

            elementJcrName = (elementJcrName == null)? COLLECTION_ELEMENT_NAME 
: elementJcrName;


Cheers,

Ricardo

Reply via email to