Hi. I have a model called Product, which has an attribute called total_price. The column total_price is automatically populated by the database using a trigger.
The problem is that if I do a $product->save(), the column total_price will be saved as well, which may lead to incorrect data being written in certain circumstances.
So far, the only way I have seen to prevent a column from being included in the save() is with something like this:
This works, but I need to remember to always save the product using the call above. Is there any better way of doing this, so I can do a $product->save() without having to worry about this?