Transient fields mapping aren't working? I delved a little deeper and I think it is bug 942, Transient fields fail to load in mapping. I downloaded the latest cvs build and I think it got broke again.   I still get a IllegalArgumentException for the following mapping.
 
-----------------------------------------------
<class name="com.opendemand.jdo.UserScenario" auto-complete="false" identity="userScenarioId" key-generator="MAX">
:
<field name="webResources" type="com.opendemand.jdo.WebResource"
collection="arraylist" required="false"
get-method="getWebResources" set-method="setWebResources" transient="true">
<bind-xml name="web-resource" node="element" transient="false" auto-naming="deriveByClass"/>
<sql transient="true" />
</field>
:
</class>
-----------------------------------------------
 
In source src/main/org/exolab/castor/jdo/engine/SQLEngine.java line 315 to 322
----------------------------------------------
if ((fieldDescriptors[i] instanceof JDOFieldDescriptor) ||
(fieldDescriptors[i].getClassDescriptor() != null)) {
if ( stack.empty() ) {
fieldsInfo.add( new FieldInfo( clsDesc, fieldDescriptors[i], clsDesc.getTableName(), !extendField ) );
} else {
fieldsInfo.add( new FieldInfo( clsDesc, fieldDescriptors[i], base.getTableName(), extendField ) );
}
}
----------------------------------------------
 
I think the problem is that I have a class description for WebResource but I would still the webResources to be transient for UserScenario.
 
 
Steve
----- Original Message -----
Sent: Thursday, February 06, 2003 4:13 PM
Subject: [castor-dev] sql transient attribute ignored

I am having problems with Castor ignoring the sql transient tag.  I am using castor 9.4.2 on Windows XP with Mysql. Does anyone know how to prevent Castor from loading database transient classes? It keeps loading the WebResources classes from the database. It works when I comment out the mapping entry.  I need the mapping entry for XML marshalling and unmarshalling.
 
Here is a copy of my mapping.xml.
:
<field name="webResources" type="com.opendemand.jdo.WebResource"
collection="arraylist" required="false"
get-method="getWebResources" set-method="setWebResources" >
<sql transient="true" />
<bind-xml name="web-resource" node="element" transient="false"/>
</field>
 
 
:
 
 
Steve

Reply via email to