I sent this a few days ago, and no one replied, I figured I would give
it one more shot (Thank you):

I just tried to upgrade a previously working 0.9.4.3 project to 0.9.5.
There seems to be some difference in the interpretation of the Mapping
file and the behavior of unmarshalling. I wonder if someone might tell
me if this is a bug by-product of some API changes, or if it is
intentional behavior in the new rev.

This is an excerpt from the mapping file:

    <class name="com.novell.afw.portlet.core.EboPortletAppModel">
        <map-to xml="portlet-app"/>
        <field ....../> <!-- Many fields -->
        <field name="portlets" collection="collection"
type="com.novell.afw.portlet.core.EboNovellPortletModel"
required="false" get-method="getCastorPortletModels">
                <bind-xml name="portlet"/>
        </field>
    </class>
<class name="com.novell.afw.portlet.core.EboNovellPortletModel">
        <field ....../> <!-- Many fields -->
    </class>


In 0.9.4.3, this works fine, when unmarshalling the child element
<portlet> xml element for <portlet-app>, the unmarshaller knows the type
of the element in the collection in the field named "portlets", and
knows that the xml element is <portlet> as inferred from the  <bind-xml
name="portlet"/>. Under .0.9.5, I get an Exception telling me that the
class descriptor for the element <portlet> can not be found. If I add an
element to the mapping for class
com.novell.afw.portlet.core.EboNovellPortletModel <map-to
xml="portlet"/>, it will pass this point, but then fails with the same
error for other fields set up in the manner. The documentation says that
the map-to element only needs to be used for top level nodes (which
portlet is not). There are several cases, where I map the same class to
different child elements and this is a real nice reuse feature, but this
won't work under 0.9.5 either. 

Any comments are appreciated.


Nathan Pahucki
Novell, Inc.
Software Architect, SCD
C 415.533.7359 
V 415.591.6532x6532
F 661.420.7729 
Novell, Inc., the leading provider of Net Business Solutions.
www.novell.com 

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to