Closed
Description
Hi,
I have a very strange behavior when I save an object, and that I apply a beforeSave trigger on it.
We suppose we have an object with an attribute equal to "100". We also have a "beforeSave" trigger that modifies this value to "50", if some conditions are right.
Now, when I call object.save(), the "beforeSave" is triggered, the value into the database is "50", but the value returned by the "save" operation is still "100".
How is it possible that the "save" operation returns an object with attributes different from what they are into the database?
Thank you.