Bruce,
You are right the sql read-only works if you update the object in a
short transaction and that is what I was looking for any way. thanx.
Steve
----- Original Message -----
From: "Bruce Snyder" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 10, 2003 1:44 AM
Subject: Re: [castor-dev] read-only fields for dependent objects
> This one time, at band camp, Stephen Ince said:
>
> SI>How do I prevent updates for dependent objects? I want the ability to
delete the objects but not to modify it's fields. The fields are actually
read-only. I have a problem marking the fields for the dependent objects as
read-only, the fields don't get values when it is saved. If I mark the
class as read-only castor complains when I tried to save the object.
> SI>
> SI>Mapping file.
> SI>
> SI>
> SI><class name="ClassA" .. >
> SI> <!-- delete but not update -->
> SI> <field name="fieldB" type="ClassB" transient="false">
> SI> <sql name="fieldB" type="integer" dirty="ignore" />
> SI> </field>
> SI></class>
> SI>
> SI><!-- delete but not update -->
> SI><class name="ClassB" depends="ClassA">
> SI> <!-- will not be updating -->
> SI> <field name="field1" type="integer" >
> SI> </field>
> SI></class>
>
> Steve,
>
> Please see the doc on the <sql> element. I believe the 'read-only'
> attribute on this element will provide the functionality you describe.
>
> Bruce
> --
> perl -e 'print
unpack("u30","<0G)[EMAIL PROTECTED]&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
>
> The Castor Project
> http://www.castor.org/
>
> Apache Geronimo
> http://incubator.apache.org/projects/geronimo.html
>
> -----------------------------------------------------------
> 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