Can I make a read only computed field writable?

Posts   
 
    
Posts: 13
Joined: 15-Jan-2006
# Posted on: 11-Apr-2006 04:46:21   

Hello,

Is it possible to override the default behavior for a computed field so that the property can be set? Here's an example:

I have an Order object that has the following properties:

  • Subtotal
  • Tax
  • Shipping
  • Total

The Total property is based on a calculated field. The problem is that it won't have a value until the Order is persisted to the database. I would like to be able to calculate the total and use it in memory before the object is persisted. Is this possible?

Thanks, austinHodge

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 11-Apr-2006 09:12:49   

I guess you may need to manually create a custom property in the generated class, apart from the database field.