On Saturday, May 26, 2012 4:45:32 AM UTC+2, Anthony wrote:

> Yes, I guess to be more clear, it should indicate that on updates, it 
> tries to compute the value using the fields being updated. If one of the 
> fields required to compute the value is not included in the update, then 
> the compute won't be updated. Note, the compute should happen as long as it 
> doesn't require any fields that are not being updated. So, this should only 
> be a problem if the compute requires multiple fields, and some of them are 
> being updated and some are not. To accommodate that case, though, the DAL 
> would have to retrieve the existing record from the db in order to get the 
> current values of the fields that aren't being updated. Of course, you 
> could always do that explicitly in your code and then include those fields 
> in the update as well.
>
> Anthony
>
>
So if the computation needs two fields and only one is updated, it won't 
execute on update. It makes sense when I rethink the logic, but I wouldn't 
have thought of this right away. I recommend mentioning this explicitly in 
the book.

I see this as one of those little things that can cause a lot of 
troubleshooting and then a grumbling facepalm, an hour or two later :)

Reply via email to