Hi Nikolov,
You'll need version 0.9.3.19 to do this, but just declare your field as
transient on the bind-xml element. This will make it transient only for
XML.
<field name="password" type="string">
<sql .../>
<bind-xml transient="true"/>
</field>
--Keith
"Nikolov. Dragomir" wrote:
>
> > Hello!
> >
> > I am having User data object which I try to marshal to XML using the
> > following mapping.
> >
> > <class name="com.seeburger.genie.vo.User"
> > identity="id"
> > access = "shared"
> > auto-complete="false"
> > key-generator="MAX">
> >
> > <map-to table="tUsers" xml="user"/>
> > <cache-type type="count-limited" />
> >
> > <field name="id" type="integer">
> > <bind-xml name="userID" node="element"/>
> > <sql name="cUserID" dirty="check" />
> > </field>
> > <field name="username" type="java.lang.String">
> > <bind-xml name="username" node="element"/>
> > <sql name="cUserName" dirty="check" />
> > </field>
> > <field name="password" type="java.lang.String">
> > <sql name="cUserPassword" dirty="check" />
> > </field>
> > <field name="realName" type="java.lang.String">
> > <bind-xml name="realName" node="element"/>
> > <sql name="cRealName" dirty="check" />
> > </field>
> > <field name="email" type="java.lang.String">
> > <bind-xml name="email" node="element"/>
> > <sql name="cEmail" dirty="check" />
> > </field>
> > </class>
> >
> > The object is used both to be marshaled to XML and to be stored to
> > Database using JDO.
> > I'd prefer not to have the password field into the XML file due to
> > security reason.
> > That's why as you can see the password field hasn't XML binding
> > specified and the class auto-complete is
> > set to false. However I still get the password into the XML.
> > I suppose that defining the field transient will not do also, because
> > then this field will not be stored
> > to the Database.
> >
> > Any suggestions how to tackle this.
> >
> > Thanks in advance.
> >
> > Best Regards,
> > Dragomir
> >
> >
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
> unsubscribe castor-dev
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev